129 lines
7.1 KiB
XML
129 lines
7.1 KiB
XML
<ui:MelWindow
|
|
x:Class="ShrlAlgoToolkit.RevitAddins.Mep.ClashResolveView"
|
|
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:ShrlAlgoToolkit.RevitAddins.RvMEP"
|
|
xmlns:rvMep1="clr-namespace:ShrlAlgoToolkit.RevitAddins.Mep"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
|
|
Title="避让处理"
|
|
Width="320"
|
|
Height="450"
|
|
MinWidth="320"
|
|
MinHeight="480"
|
|
d:DataContext="{d:DesignInstance Type=local:ClashResolveViewModel}"
|
|
Icon="{DynamicResource RevitIcon}"
|
|
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:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
|
</Window.Resources>
|
|
<ui:StackPanel Margin="5" Spacing="5">
|
|
<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:StackPanel Orientation="Horizontal" Spacing="5">
|
|
<GroupBox ui:StackPanel.Fill="Fill" Header="参考方式">
|
|
<UniformGrid Rows="1">
|
|
<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="选择相交的两条管线,将翻弯管线偏移一定距离" />
|
|
</UniformGrid>
|
|
</GroupBox>
|
|
<GroupBox ui:StackPanel.Fill="Fill" Header="调整方式">
|
|
<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:StackPanel>
|
|
<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>
|
|
<TextBox
|
|
ui:InputAssist.Prefix="偏移量:"
|
|
ui:InputAssist.Suffix="mm"
|
|
ui:StackPanel.Fill="Fill"
|
|
Text="{Binding Offset, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Button
|
|
HorizontalAlignment="Stretch"
|
|
ui:StackPanel.Fill="Fill"
|
|
Command="{Binding ResolveCommand}"
|
|
Content="调整" />
|
|
</ui:StackPanel>
|
|
</ui:MelWindow> |