Files
Shrlalgo.RvKits/ShrlAlgo.RvKits/RvMEP/ClashResolveView.xaml

128 lines
6.9 KiB
Plaintext
Raw Normal View History

<ui:FluentWindowEx
x:Class="ShrlAlgo.RvKits.RvMEP.ClashResolveView"
2024-09-22 11:05:41 +08:00
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:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgo.RvKits.RvMEP"
2024-09-22 11:05:41 +08:00
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
2024-09-22 11:05:41 +08:00
Title="避让处理"
Width="320"
Height="450"
MinWidth="320"
MinHeight="480"
d:DataContext="{d:DesignInstance Type=local:ClashResolveViewModel}"
mc:Ignorable="d">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Closing">
<b:InvokeCommandAction Command="{Binding ClosingCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgo.RvKits;component/WPFUI.xaml" />
2024-09-22 11:05:41 +08:00
</Window.Resources>
<ui:StackPanelEx Margin="5" Spacing="5">
2024-09-22 11:05:41 +08:00
<GroupBox Header="角度">
<UniformGrid Columns="3">
<!--<ui:CardColor />-->
<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 IsEnabled="{Binding IsChecked, ElementName=LbCustom}" Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" />
</UniformGrid>
</GroupBox>
<ui:StackPanelEx Orientation="Horizontal" Spacing="5">
<GroupBox ui:StackPanelEx.Fill="Fill" Header="参考方式">
2024-09-22 11:05:41 +08:00
<UniformGrid Rows="1">
2024-12-22 10:26:12 +08:00
<RadioButton
Content="手动"
IsChecked="{Binding LocationType, ConverterParameter={x:Static local:LocationType.Manual}, Converter={StaticResource ComparisonConverter}}"
ToolTip="手动选取两点" />
<RadioButton
Content="参考"
IsChecked="{Binding LocationType, ConverterParameter={x:Static local:LocationType.Reference}, Converter={StaticResource ComparisonConverter}}"
ToolTip="选择相交的两条管线,将翻弯管线偏移一定距离" />
2024-09-22 11:05:41 +08:00
</UniformGrid>
</GroupBox>
<GroupBox ui:StackPanelEx.Fill="Fill" Header="调整方式">
2024-09-22 11:05:41 +08:00
<UniformGrid Rows="1">
<RadioButton Content="单侧" IsChecked="{Binding AdjustType, ConverterParameter={x:Static local:AdjustType.OneSide}, Converter={StaticResource ComparisonConverter}}" />
<RadioButton Content="双侧" IsChecked="{Binding AdjustType, ConverterParameter={x:Static local:AdjustType.TwoSide}, Converter={StaticResource ComparisonConverter}}" />
</UniformGrid>
</GroupBox>
</ui:StackPanelEx>
2024-09-22 11:05:41 +08:00
<GroupBox Grid.Row="2" Header="调整方向">
<UniformGrid Rows="1">
<RadioButton Content="上" IsChecked="{Binding AdjustDirection, ConverterParameter={x:Static local:AdjustDirection.Up}, Converter={StaticResource ComparisonConverter}}" />
<RadioButton Content="下" IsChecked="{Binding AdjustDirection, ConverterParameter={x:Static local:AdjustDirection.Down}, Converter={StaticResource ComparisonConverter}}" />
<RadioButton Content="左" IsChecked="{Binding AdjustDirection, ConverterParameter={x:Static local:AdjustDirection.Left}, Converter={StaticResource ComparisonConverter}}" />
<RadioButton Content="右" IsChecked="{Binding AdjustDirection, ConverterParameter={x:Static local:AdjustDirection.Right}, Converter={StaticResource ComparisonConverter}}" />
</UniformGrid>
</GroupBox>
<ui:TextBoxEx
ui:StackPanelEx.Fill="Fill"
2024-09-22 11:05:41 +08:00
Prefix="偏移量:"
Suffix="mm"
Text="{Binding Offset, UpdateSourceTrigger=PropertyChanged}" />
<Button
HorizontalAlignment="Stretch"
ui:StackPanelEx.Fill="Fill"
2024-09-22 11:05:41 +08:00
Command="{Binding ResolveCommand}"
Content="调整" />
</ui:StackPanelEx>
</ui:FluentWindowEx>