2025-09-16 16:06:41 +08:00
|
|
|
<controls:MaterialWindow
|
|
|
|
|
x:Class="Szmedi.RvKits.MEPTools.ClashResolveWin"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
|
xmlns:mep="clr-namespace:Szmedi.RvKits.MEPTools"
|
|
|
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
|
|
|
Title="避让处理"
|
|
|
|
|
Width="300"
|
|
|
|
|
Height="520"
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=mep:ClashResolveViewModel}"
|
|
|
|
|
SizeToContent="Height"
|
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
<!--<b:EventTrigger EventName="Deactivated">
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ConfirmCommand}" />
|
|
|
|
|
</b:EventTrigger>-->
|
|
|
|
|
<b:EventTrigger EventName="Closing">
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ClosingCommand}" />
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
</b:Interaction.Triggers>
|
|
|
|
|
<controls:MaterialWindow.Resources>
|
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
|
|
|
|
<!--<ResourceDictionary>
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
</ResourceDictionary>-->
|
|
|
|
|
</controls:MaterialWindow.Resources>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
</Grid.RowDefinitions>
|
2025-09-19 09:18:09 +08:00
|
|
|
<GroupBox
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Header="角度(°)">
|
|
|
|
|
<UniformGrid
|
|
|
|
|
Height="180"
|
|
|
|
|
Columns="3"
|
|
|
|
|
Rows="3">
|
2025-09-16 16:06:41 +08:00
|
|
|
<RadioButton Content="15°">
|
|
|
|
|
<RadioButton.IsChecked>
|
|
|
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
|
|
|
|
<Binding.ConverterParameter>
|
|
|
|
|
<sys:Double>15</sys:Double>
|
|
|
|
|
</Binding.ConverterParameter>
|
|
|
|
|
</Binding>
|
|
|
|
|
</RadioButton.IsChecked>
|
|
|
|
|
</RadioButton>
|
|
|
|
|
<RadioButton Content="22.5°">
|
|
|
|
|
<RadioButton.IsChecked>
|
|
|
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
|
|
|
|
<Binding.ConverterParameter>
|
|
|
|
|
<sys:Double>22.5</sys:Double>
|
|
|
|
|
</Binding.ConverterParameter>
|
|
|
|
|
</Binding>
|
|
|
|
|
</RadioButton.IsChecked>
|
|
|
|
|
</RadioButton>
|
|
|
|
|
<RadioButton Content="30°">
|
|
|
|
|
<RadioButton.IsChecked>
|
|
|
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
|
|
|
|
<Binding.ConverterParameter>
|
|
|
|
|
<sys:Double>30</sys:Double>
|
|
|
|
|
</Binding.ConverterParameter>
|
|
|
|
|
</Binding>
|
|
|
|
|
</RadioButton.IsChecked>
|
|
|
|
|
</RadioButton>
|
|
|
|
|
<RadioButton Content="45°">
|
|
|
|
|
<RadioButton.IsChecked>
|
|
|
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
|
|
|
|
<Binding.ConverterParameter>
|
|
|
|
|
<sys:Double>45</sys:Double>
|
|
|
|
|
</Binding.ConverterParameter>
|
|
|
|
|
</Binding>
|
|
|
|
|
</RadioButton.IsChecked>
|
|
|
|
|
</RadioButton>
|
|
|
|
|
<RadioButton Content="60°">
|
|
|
|
|
<RadioButton.IsChecked>
|
|
|
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
|
|
|
|
<Binding.ConverterParameter>
|
|
|
|
|
<sys:Double>60</sys:Double>
|
|
|
|
|
</Binding.ConverterParameter>
|
|
|
|
|
</Binding>
|
|
|
|
|
</RadioButton.IsChecked>
|
|
|
|
|
</RadioButton>
|
|
|
|
|
<RadioButton Content="90°">
|
|
|
|
|
<RadioButton.IsChecked>
|
|
|
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
|
|
|
|
<Binding.ConverterParameter>
|
|
|
|
|
<sys:Double>90</sys:Double>
|
|
|
|
|
</Binding.ConverterParameter>
|
|
|
|
|
</Binding>
|
|
|
|
|
</RadioButton.IsChecked>
|
|
|
|
|
</RadioButton>
|
|
|
|
|
<RadioButton x:Name="LbCustom" Content="自定义" />
|
|
|
|
|
<TextBox Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsChecked, Converter={x:Static md:BooleanToVisibilityConverter.CollapsedInstance}, ElementName=LbCustom}" />
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
<UniformGrid
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Columns="2"
|
|
|
|
|
Rows="1">
|
|
|
|
|
<GroupBox Header="参考方式">
|
|
|
|
|
<UniformGrid Rows="1">
|
2025-09-19 09:18:09 +08:00
|
|
|
<RadioButton
|
|
|
|
|
Content="手动"
|
|
|
|
|
IsChecked="{Binding LocationType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:LocationType.Manual}}"
|
|
|
|
|
ToolTip="手动选取两点" />
|
|
|
|
|
<RadioButton
|
|
|
|
|
Content="参考"
|
|
|
|
|
IsChecked="{Binding LocationType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:LocationType.Reference}}"
|
|
|
|
|
ToolTip="选择相交的两条管线,将翻弯管线偏移一定距离" />
|
2025-09-16 16:06:41 +08:00
|
|
|
</UniformGrid>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
<GroupBox Header="调整方式">
|
|
|
|
|
<UniformGrid Rows="1">
|
|
|
|
|
<RadioButton Content="单侧" IsChecked="{Binding AdjustType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:AdjustType.OneSide}}" />
|
|
|
|
|
<RadioButton Content="双侧" IsChecked="{Binding AdjustType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:AdjustType.TwoSide}}" />
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
<GroupBox Grid.Row="2" Header="调整方向">
|
|
|
|
|
<UniformGrid Rows="1">
|
|
|
|
|
<RadioButton Content="上" IsChecked="{Binding AdjustDirection, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:AdjustDirection.Up}}" />
|
|
|
|
|
<RadioButton Content="下" IsChecked="{Binding AdjustDirection, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:AdjustDirection.Down}}" />
|
|
|
|
|
<RadioButton Content="左" IsChecked="{Binding AdjustDirection, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:AdjustDirection.Left}}" />
|
|
|
|
|
<RadioButton Content="右" IsChecked="{Binding AdjustDirection, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:AdjustDirection.Right}}" />
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
<UniformGrid Grid.Row="3" Columns="2">
|
2025-09-19 09:18:09 +08:00
|
|
|
<TextBox
|
|
|
|
|
md:HintAssist.Hint="偏移量"
|
|
|
|
|
md:TextFieldAssist.SuffixText="mm"
|
|
|
|
|
Text="{Binding Offset, UpdateSourceTrigger=PropertyChanged}" />
|
2025-09-16 16:06:41 +08:00
|
|
|
<Button Command="{Binding ResolveCommand}" Content="调整" />
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</controls:MaterialWindow>
|