109 lines
5.6 KiB
Plaintext
109 lines
5.6 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.MEPTools.AnyConnectWin"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:local="clr-namespace:Szmedi.RvKits.MEPTools"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||
|
|
Title="任意连接"
|
||
|
|
Width="300"
|
||
|
|
Height="320"
|
||
|
|
SizeToContent="Height"
|
||
|
|
d:DataContext="{d:DesignInstance Type=local:AnyConnectViewModel}"
|
||
|
|
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<controls:MaterialWindow.Resources>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
||
|
|
</controls:MaterialWindow.Resources>
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<GroupBox
|
||
|
|
Grid.Row="0"
|
||
|
|
Grid.Column="0"
|
||
|
|
Header="连接角度(°)"
|
||
|
|
ToolTip="平行或垂直连接时生效">
|
||
|
|
<UniformGrid Columns="3">
|
||
|
|
<RadioButton Content="默认" ToolTip="根据位置自动连接">
|
||
|
|
<RadioButton.IsChecked>
|
||
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
||
|
|
<Binding.ConverterParameter>
|
||
|
|
<system:Double>0</system:Double>
|
||
|
|
</Binding.ConverterParameter>
|
||
|
|
</Binding>
|
||
|
|
</RadioButton.IsChecked>
|
||
|
|
</RadioButton>
|
||
|
|
<RadioButton Content="15°">
|
||
|
|
<RadioButton.IsChecked>
|
||
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
||
|
|
<Binding.ConverterParameter>
|
||
|
|
<system:Double>15</system:Double>
|
||
|
|
</Binding.ConverterParameter>
|
||
|
|
</Binding>
|
||
|
|
</RadioButton.IsChecked>
|
||
|
|
</RadioButton>
|
||
|
|
<RadioButton Content="22.5°">
|
||
|
|
<RadioButton.IsChecked>
|
||
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
||
|
|
<Binding.ConverterParameter>
|
||
|
|
<system:Double>22.5</system:Double>
|
||
|
|
</Binding.ConverterParameter>
|
||
|
|
</Binding>
|
||
|
|
</RadioButton.IsChecked>
|
||
|
|
</RadioButton>
|
||
|
|
<RadioButton Content="30°">
|
||
|
|
<RadioButton.IsChecked>
|
||
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
||
|
|
<Binding.ConverterParameter>
|
||
|
|
<system:Double>30</system:Double>
|
||
|
|
</Binding.ConverterParameter>
|
||
|
|
</Binding>
|
||
|
|
</RadioButton.IsChecked>
|
||
|
|
</RadioButton>
|
||
|
|
<RadioButton Content="45°">
|
||
|
|
<RadioButton.IsChecked>
|
||
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
||
|
|
<Binding.ConverterParameter>
|
||
|
|
<system:Double>45</system:Double>
|
||
|
|
</Binding.ConverterParameter>
|
||
|
|
</Binding>
|
||
|
|
</RadioButton.IsChecked>
|
||
|
|
</RadioButton>
|
||
|
|
<RadioButton Content="60°">
|
||
|
|
<RadioButton.IsChecked>
|
||
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
||
|
|
<Binding.ConverterParameter>
|
||
|
|
<system:Double>60</system:Double>
|
||
|
|
</Binding.ConverterParameter>
|
||
|
|
</Binding>
|
||
|
|
</RadioButton.IsChecked>
|
||
|
|
</RadioButton>
|
||
|
|
<RadioButton Content="90°">
|
||
|
|
<RadioButton.IsChecked>
|
||
|
|
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
|
||
|
|
<Binding.ConverterParameter>
|
||
|
|
<system:Double>90</system:Double>
|
||
|
|
</Binding.ConverterParameter>
|
||
|
|
</Binding>
|
||
|
|
</RadioButton.IsChecked>
|
||
|
|
</RadioButton>
|
||
|
|
<RadioButton x:Name="LbCustom" Content="自定义" />
|
||
|
|
<TextBox VerticalAlignment="Center" HorizontalContentAlignment="Center" Style="{StaticResource MaterialDesignTextBox}" Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsChecked, Converter={x:Static md:BooleanToVisibilityConverter.CollapsedInstance}, ElementName=LbCustom}" />
|
||
|
|
</UniformGrid>
|
||
|
|
</GroupBox>
|
||
|
|
<GroupBox Grid.Row="1" Header="选择方式">
|
||
|
|
<UniformGrid Rows="1">
|
||
|
|
<RadioButton Content="框选" IsChecked="{Binding IsMultiSelect, Converter={x:Static md:InvertBooleanConverter.Instance}}" ToolTip="矩形框框选" />
|
||
|
|
<RadioButton Content="多选" IsChecked="{Binding IsMultiSelect}" ToolTip="选择后完成" />
|
||
|
|
</UniformGrid>
|
||
|
|
</GroupBox>
|
||
|
|
<Button Grid.Row="2" Command="{Binding ConnectCommand}" Content="连接管线" />
|
||
|
|
</Grid>
|
||
|
|
</controls:MaterialWindow>
|