123 lines
6.8 KiB
Plaintext
123 lines
6.8 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.ModelManager.ModelCheckWin"
|
||
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
xmlns:modelManager="clr-namespace:Szmedi.RvKits.ModelManager"
|
||
|
|
Title="模型检查"
|
||
|
|
Width="600"
|
||
|
|
Height="450"
|
||
|
|
d:DataContext="{d:DesignInstance modelManager:ModelCheckViewModel}"
|
||
|
|
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<controls:MaterialWindow.Resources>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
||
|
|
</controls:MaterialWindow.Resources>
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<DataGrid
|
||
|
|
Grid.ColumnSpan="3"
|
||
|
|
AutoGenerateColumns="False"
|
||
|
|
CanUserAddRows="False"
|
||
|
|
IsReadOnly="True"
|
||
|
|
ItemsSource="{Binding Items}"
|
||
|
|
ToolTip="双击行可快速定位"
|
||
|
|
VirtualizingPanel.IsVirtualizingWhenGrouping="True">
|
||
|
|
<b:Interaction.Triggers>
|
||
|
|
<b:EventTrigger EventName="MouseDoubleClick">
|
||
|
|
<b:InvokeCommandAction Command="{Binding ShowElementCommand}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}" />
|
||
|
|
</b:EventTrigger>
|
||
|
|
</b:Interaction.Triggers>
|
||
|
|
<DataGrid.GroupStyle>
|
||
|
|
<GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}">
|
||
|
|
<GroupStyle.Panel>
|
||
|
|
<ItemsPanelTemplate>
|
||
|
|
<DataGridRowsPresenter />
|
||
|
|
</ItemsPanelTemplate>
|
||
|
|
</GroupStyle.Panel>
|
||
|
|
</GroupStyle>
|
||
|
|
</DataGrid.GroupStyle>
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<DataGridTextColumn Binding="{Binding Element.Id}" Header="ID" />
|
||
|
|
<DataGridTextColumn Binding="{Binding Element.Category.Name}" Header="族类别名称" />
|
||
|
|
<DataGridTextColumn Binding="{Binding Element.Name}" Header="类型或实例名称" />
|
||
|
|
<!-- ReSharper disable once Xaml.BindingWithContextNotResolved -->
|
||
|
|
<DataGridTextColumn Binding="{Binding Element.ReferenceLevel.Name}" Header="参照标高" />
|
||
|
|
<!-- ReSharper disable once Xaml.BindingWithContextNotResolved -->
|
||
|
|
<DataGridTextColumn Binding="{Binding Element.MEPSystem.Name}" Header="系统" />
|
||
|
|
<!-- ReSharper disable once Xaml.BindingWithContextNotResolved -->
|
||
|
|
<DataGridTextColumn Binding="{Binding Element.Host.Name}" Header="主体" />
|
||
|
|
<!-- ReSharper disable once Xaml.BindingWithContextNotResolved -->
|
||
|
|
<DataGridTextColumn Binding="{Binding Element.Room.Name}" Header="房间" />
|
||
|
|
<!--<DataGridTextColumn Binding="{Binding ErrorMessage}" Header="错误信息" />-->
|
||
|
|
<!--<DataGridTemplateColumn Header="操作">
|
||
|
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
-->
|
||
|
|
<!-- 按钮参数绑定到当前行的绑定的Item -->
|
||
|
|
<!--
|
||
|
|
<Button
|
||
|
|
Command="{Binding DataContext.ShowElementCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
|
||
|
|
CommandParameter="{Binding}"
|
||
|
|
Content="定位构件" />
|
||
|
|
</DataTemplate>
|
||
|
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
|
</DataGridTemplateColumn>-->
|
||
|
|
</DataGrid.Columns>
|
||
|
|
</DataGrid>
|
||
|
|
<StackPanel
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="0"
|
||
|
|
Grid.ColumnSpan="2"
|
||
|
|
Margin="5">
|
||
|
|
<md:Card Margin="5">
|
||
|
|
<TextBlock Text="{Binding ProjectBasePoint, StringFormat={}项目基点:{0}}" />
|
||
|
|
</md:Card>
|
||
|
|
<md:Card Margin="5">
|
||
|
|
<TextBlock Text="{Binding SharedBasePoint, StringFormat={}测量点:{0}}" />
|
||
|
|
</md:Card>
|
||
|
|
</StackPanel>
|
||
|
|
<UniformGrid Grid.Row="2" Grid.Column="0" Rows="3">
|
||
|
|
<CheckBox Content="管线坡度" IsChecked="{Binding IsCheckSlope}" ToolTip="管线坡度错误" />
|
||
|
|
<CheckBox Content="孤立管线" IsChecked="{Binding IsCheckLength}" ToolTip="检查管线长度是否过短" />
|
||
|
|
<CheckBox Content="参照标高" IsChecked="{Binding IsCheckLevel}" ToolTip="检查构件的参照标高" />
|
||
|
|
<CheckBox Content="命名要求" IsChecked="{Binding IsCheckName}" ToolTip="检查构件的三段式命名" />
|
||
|
|
<CheckBox Content="构件复杂度" IsChecked="{Binding IsCheckSymbolGeometry}" ToolTip="检查构件的复杂程度,
避免模型导出或轻量化失败" />
|
||
|
|
<CheckBox Content="属性检查" IsChecked="{Binding IsCheckProps}" ToolTip="检查构件属性是否存在,是否填写" />
|
||
|
|
<CheckBox Content="重叠管线" IsChecked="{Binding IsCheckEqual}" ToolTip="检查管线是否重叠" />
|
||
|
|
</UniformGrid>
|
||
|
|
<UniformGrid Grid.Row="2" Grid.Column="1" Rows="2">
|
||
|
|
<TextBlock Text="{Binding ErrorCount, Mode=TwoWay, StringFormat={}问题数量:{0}}" />
|
||
|
|
<UniformGrid Rows="1">
|
||
|
|
<!--
|
||
|
|
md:ButtonProgressAssist.IsIndeterminate="{Binding CheckModelCommand.ExecutionTask,Converter={StaticResource TaskResultConverter}, Mode=OneWay}"
|
||
|
|
md:ButtonProgressAssist.IsIndicatorVisible="{Binding CheckModelCommand.IsRunning, Converter={x:Static md:BooleanToVisibilityConverter.CollapsedInstance}, Mode=OneWay}"
|
||
|
|
md:ButtonProgressAssist.Value="-1"
|
||
|
|
-->
|
||
|
|
<Button Width="80" Command="{Binding CheckModelCommand}" Content="审查" />
|
||
|
|
<Button
|
||
|
|
Width="80"
|
||
|
|
Command="{Binding ExportToExcelCommand}"
|
||
|
|
Content="导出"
|
||
|
|
ToolTip="导出检查结果" />
|
||
|
|
<Button
|
||
|
|
Width="80"
|
||
|
|
Command="{Binding ModifyModelCommand}"
|
||
|
|
Content="修改"
|
||
|
|
ToolTip="对参照标高进行修改" />
|
||
|
|
</UniformGrid>
|
||
|
|
</UniformGrid>
|
||
|
|
</Grid>
|
||
|
|
</controls:MaterialWindow>
|