137 lines
5.7 KiB
Plaintext
137 lines
5.7 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.ModelManager.ProjectComparatorView"
|
||
|
|
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:local="clr-namespace:Szmedi.RvKits.ModelManager"
|
||
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
Title="文档比较"
|
||
|
|
Width="800"
|
||
|
|
Height="450"
|
||
|
|
d:DataContext="{d:DesignInstance Type=local:ProjectComparatorViewModel}"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<controls:MaterialWindow.Resources>
|
||
|
|
<ResourceDictionary>
|
||
|
|
<ResourceDictionary.MergedDictionaries>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
||
|
|
</ResourceDictionary.MergedDictionaries>
|
||
|
|
<Style x:Key="CenteredTextBlockStyle" TargetType="{x:Type TextBlock}">
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||
|
|
</Style>
|
||
|
|
</ResourceDictionary>
|
||
|
|
</controls:MaterialWindow.Resources>
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition />
|
||
|
|
<ColumnDefinition />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<!-- 工具栏:全选/手动添加 -->
|
||
|
|
<Grid Grid.Row="0">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<!-- 自定义参数输入 -->
|
||
|
|
<TextBox
|
||
|
|
VerticalContentAlignment="Center"
|
||
|
|
materialDesign:HintAssist.Hint="输入要添加到检查的参数"
|
||
|
|
Text="{Binding CustomDesignParamName, UpdateSourceTrigger=PropertyChanged}"
|
||
|
|
ToolTip="输入参数名" />
|
||
|
|
<Button
|
||
|
|
Grid.Column="1"
|
||
|
|
Command="{Binding AddCustomDesignParameterCommand}"
|
||
|
|
Content="添加" />
|
||
|
|
<Button
|
||
|
|
Grid.Column="2"
|
||
|
|
Command="{Binding RemoveCustomDesignParameterCommand}"
|
||
|
|
CommandParameter="{Binding ElementName=DesignParametersListBox, Path=SelectedItems}"
|
||
|
|
Content="移除"
|
||
|
|
ToolTip="移除选中设计参数" />
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<!-- 参数列表 -->
|
||
|
|
<GroupBox Grid.Row="1" Header="设计参数">
|
||
|
|
<ListBox
|
||
|
|
x:Name="DesignParametersListBox"
|
||
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||
|
|
BorderThickness="0"
|
||
|
|
DisplayMemberPath="Name"
|
||
|
|
ItemsSource="{Binding DesignParameters}"
|
||
|
|
SelectionMode="Multiple"
|
||
|
|
Style="{StaticResource MaterialDesignFilterChipListBox}" />
|
||
|
|
</GroupBox>
|
||
|
|
<Grid Grid.Row="0" Grid.Column="1">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<TextBox
|
||
|
|
Grid.Column="0"
|
||
|
|
VerticalContentAlignment="Center"
|
||
|
|
materialDesign:HintAssist.Hint="输入出量参数"
|
||
|
|
Text="{Binding CustomQuantityParamName, UpdateSourceTrigger=PropertyChanged}"
|
||
|
|
ToolTip="输入出量参数名" />
|
||
|
|
<Button
|
||
|
|
Grid.Column="1"
|
||
|
|
Command="{Binding AddCustomQuantityParameterCommand}"
|
||
|
|
Content="添加" />
|
||
|
|
<Button
|
||
|
|
Grid.Column="2"
|
||
|
|
Command="{Binding RemoveCustomQuantityParameterCommand}"
|
||
|
|
CommandParameter="{Binding ElementName=QuantityParametersListBox, Path=SelectedItems}"
|
||
|
|
Content="移除"
|
||
|
|
ToolTip="移除选中出量参数" />
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<!-- 参数列表 -->
|
||
|
|
<GroupBox
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="1"
|
||
|
|
Header="出量参数">
|
||
|
|
<ListBox
|
||
|
|
x:Name="QuantityParametersListBox"
|
||
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||
|
|
DisplayMemberPath="Name"
|
||
|
|
ItemsSource="{Binding QuantityParameters}"
|
||
|
|
SelectionMode="Multiple"
|
||
|
|
Style="{StaticResource MaterialDesignFilterChipListBox}" />
|
||
|
|
</GroupBox>
|
||
|
|
|
||
|
|
<!-- 底部按钮 -->
|
||
|
|
<StackPanel
|
||
|
|
Grid.Row="2"
|
||
|
|
Grid.ColumnSpan="2"
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Orientation="Horizontal">
|
||
|
|
<ComboBox
|
||
|
|
materialDesign:HintAssist.Hint="选择变更前的文档"
|
||
|
|
DisplayMemberPath="Title"
|
||
|
|
ItemsSource="{Binding OldDocuments}"
|
||
|
|
SelectedItem="{Binding OldDocument}" />
|
||
|
|
<ComboBox
|
||
|
|
materialDesign:HintAssist.Hint="选择变更后的文档"
|
||
|
|
DisplayMemberPath="Title"
|
||
|
|
ItemsSource="{Binding NewDocuments}"
|
||
|
|
SelectedItem="{Binding NewDocument}" />
|
||
|
|
<Button
|
||
|
|
Grid.Row="2"
|
||
|
|
Command="{Binding StartCompareCommand}"
|
||
|
|
CommandParameter="{Binding ElementName=ParametersListBox, Path=SelectedItems}"
|
||
|
|
Content="开始对比"
|
||
|
|
IsDefault="True" />
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
|
||
|
|
</Grid>
|
||
|
|
</controls:MaterialWindow>
|