129 lines
7.2 KiB
Plaintext
129 lines
7.2 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.InfoManager.AFCA.AFCAWin"
|
||
|
|
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:db="clr-namespace:Autodesk.Revit.DB;assembly=RevitAPI"
|
||
|
|
xmlns:local="clr-namespace:Szmedi.RvKits.InfoManager.AFCA"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
Title="轨交交付批处理"
|
||
|
|
Width="800"
|
||
|
|
Height="450"
|
||
|
|
d:DataContext="{d:DesignInstance Type=local:ApprovalViewModel}"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<controls:MaterialWindow.Resources>
|
||
|
|
<ResourceDictionary>
|
||
|
|
<ResourceDictionary.MergedDictionaries>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
||
|
|
</ResourceDictionary.MergedDictionaries>
|
||
|
|
</ResourceDictionary>
|
||
|
|
</controls:MaterialWindow.Resources>
|
||
|
|
<md:DrawerHost x:Name="DrawerHost" OpenMode="Standard">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<GroupBox Header="标准分类">
|
||
|
|
<TreeView x:Name="classTreeView" MinWidth="200" ItemsSource="{Binding ClassHierarchicalData}">
|
||
|
|
<b:Interaction.Triggers>
|
||
|
|
<b:EventTrigger EventName="SelectedItemChanged">
|
||
|
|
<b:InvokeCommandAction Command="{Binding GetPropertiesCommand}" CommandParameter="{Binding ElementName=classTreeView, Path=SelectedItem}" />
|
||
|
|
</b:EventTrigger>
|
||
|
|
</b:Interaction.Triggers>
|
||
|
|
<TreeView.ItemTemplate>
|
||
|
|
<HierarchicalDataTemplate DataType="{x:Type local:ClassificationModel}" ItemsSource="{Binding Children}">
|
||
|
|
<TextBlock Text="{Binding CategoryName}" />
|
||
|
|
</HierarchicalDataTemplate>
|
||
|
|
</TreeView.ItemTemplate>
|
||
|
|
</TreeView>
|
||
|
|
</GroupBox>
|
||
|
|
<DataGrid
|
||
|
|
Grid.Row="0"
|
||
|
|
Grid.Column="1"
|
||
|
|
AutoGenerateColumns="False"
|
||
|
|
CanUserAddRows="False"
|
||
|
|
IsReadOnly="True"
|
||
|
|
ItemsSource="{Binding Properties}">
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<DataGridCheckBoxColumn Binding="{Binding Mandatory, Converter={StaticResource IntToBooleanConverter}}" Header="是否必填" />
|
||
|
|
<DataGridTextColumn Binding="{Binding RevitParamGroup}" Header="Revit参数分组" />
|
||
|
|
<!--<DataGridTextColumn Binding="{Binding ParamPrefix}" Header="参数前缀" />-->
|
||
|
|
<DataGridTextColumn Binding="{Binding ParamName}" Header="参数名" />
|
||
|
|
<DataGridTextColumn Binding="{Binding ParamType}" Header="参数类型" />
|
||
|
|
<DataGridTextColumn Binding="{Binding Unit}" Header="计量单位" />
|
||
|
|
<!--<DataGridTextColumn Binding="{Binding InfoLevel}" Header="信息深度" />-->
|
||
|
|
</DataGrid.Columns>
|
||
|
|
</DataGrid>
|
||
|
|
<StackPanel
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.ColumnSpan="3"
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Orientation="Horizontal">
|
||
|
|
<!--<CheckBox Content="批处理值覆盖" />-->
|
||
|
|
<Button Command="{Binding BatchProcessCommand}" Content="预处理" ToolTip="根据内置规则批处理标识和编码" />
|
||
|
|
<Button
|
||
|
|
Command="{Binding ModifyIdAndCodeCommand}"
|
||
|
|
CommandParameter="{Binding ElementName=classTreeView, Path=SelectedItem}"
|
||
|
|
Content="批处理"
|
||
|
|
ToolTip="选择标准分类,框选元素批量添加标识及编码" />
|
||
|
|
<Button Command="{Binding ModifyCodeCommand}" Content="编码处理" ToolTip="根据深圳构件标识,赋予编码" />
|
||
|
|
<Button
|
||
|
|
Command="{Binding CheckIdCommand}"
|
||
|
|
CommandParameter="{Binding ElementName=OpenResult}"
|
||
|
|
Content="检查标识"
|
||
|
|
ToolTip="检查标识" />
|
||
|
|
<ToggleButton
|
||
|
|
x:Name="OpenResult"
|
||
|
|
Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
|
||
|
|
IsChecked="{Binding ElementName=DrawerHost, Path=IsRightDrawerOpen}"
|
||
|
|
RenderTransformOrigin="0.5,0.5"
|
||
|
|
Style="{StaticResource MaterialDesignHamburgerToggleButton}"
|
||
|
|
ToolTip="打开结果">
|
||
|
|
<ToggleButton.RenderTransform>
|
||
|
|
<ScaleTransform ScaleX="-1" />
|
||
|
|
</ToggleButton.RenderTransform>
|
||
|
|
<!--<b:Interaction.Triggers>
|
||
|
|
<b:EventTrigger EventName="Click">
|
||
|
|
<b:ChangePropertyAction PropertyName="IsRightDrawerOpen" TargetObject="{Binding ElementName=DrawerHost}" Value="true" />
|
||
|
|
</b:EventTrigger>
|
||
|
|
</b:Interaction.Triggers>-->
|
||
|
|
</ToggleButton>
|
||
|
|
<!--<Button Command="{Binding BatchAddPropertyCommand}" Content="批量添加参数" ToolTip="根据标识批量添加相应属性" />-->
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
<md:DrawerHost.RightDrawerContent>
|
||
|
|
<GroupBox Header="检查结果">
|
||
|
|
<TreeView x:Name="elemTreeView" MinWidth="200" ItemsSource="{Binding KeyValues}">
|
||
|
|
<b:Interaction.Triggers>
|
||
|
|
<b:EventTrigger EventName="MouseDoubleClick">
|
||
|
|
<b:InvokeCommandAction Command="{Binding LocationElementCommand}" CommandParameter="{Binding ElementName=elemTreeView, Path=SelectedItem}" />
|
||
|
|
</b:EventTrigger>
|
||
|
|
</b:Interaction.Triggers>
|
||
|
|
<TreeView.ItemTemplate>
|
||
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Value}">
|
||
|
|
<TextBlock Text="{Binding Key}" />
|
||
|
|
<HierarchicalDataTemplate.ItemTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<TextBlock Text="{Binding Name}" />
|
||
|
|
<TextBlock Text="-" />
|
||
|
|
<TextBlock Text="{Binding Id}" />
|
||
|
|
</StackPanel>
|
||
|
|
</DataTemplate>
|
||
|
|
</HierarchicalDataTemplate.ItemTemplate>
|
||
|
|
</HierarchicalDataTemplate>
|
||
|
|
</TreeView.ItemTemplate>
|
||
|
|
</TreeView>
|
||
|
|
</GroupBox>
|
||
|
|
</md:DrawerHost.RightDrawerContent>
|
||
|
|
</md:DrawerHost>
|
||
|
|
</controls:MaterialWindow>
|