Files
ShrlAlgoToolkit/ShrlAlgoToolkit.RevitAddins/ModelManager/ModelCheckView.xaml

152 lines
7.6 KiB
Plaintext
Raw Normal View History

2025-08-26 21:33:20 +08:00
<n:NeoWindow
2025-04-24 20:56:44 +08:00
x:Class="ShrlAlgoToolkit.RevitAddins.ModelManager.ModelCheckView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2025-08-26 21:33:20 +08:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2025-04-24 20:56:44 +08:00
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvFamily"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:modelManager="clr-namespace:ShrlAlgoToolkit.RevitAddins.ModelManager"
2025-08-26 21:33:20 +08:00
xmlns:n="https://github.com/ShrlAlgo/NeoUI"
Title="模型检查"
Width="600"
MinHeight="500"
d:DataContext="{d:DesignInstance modelManager:ModelCheckViewModel}"
mc:Ignorable="d">
2024-09-22 11:05:41 +08:00
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
2025-04-24 20:56:10 +08:00
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
2025-08-26 21:33:20 +08:00
<!--<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/ColorPalette/LightBlue.xaml"/>
<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/Styles.xaml" />-->
2024-09-22 11:05:41 +08:00
</ResourceDictionary.MergedDictionaries>
2025-08-26 21:33:20 +08:00
<Style x:Key="GroupHeaderStyle" TargetType="{x:Type GroupItem}">
2024-09-22 11:05:41 +08:00
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander Header="{Binding Name}" IsExpanded="True">
<!--<Expander.Header>
<TextBlock Text="{Binding Path=Name}"/>
</Expander.Header>-->
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Window.Resources>
2025-08-26 21:33:20 +08:00
<n:Grid
2024-09-22 11:05:41 +08:00
ChildMargin="5"
Columns="*,Auto"
Rows="*,Auto,Auto">
<DataGrid
2025-08-26 21:33:20 +08:00
Grid.ColumnSpan="2"
2024-09-22 11:05:41 +08:00
AutoGenerateColumns="False"
CanUserAddRows="False"
IsReadOnly="True"
ItemsSource="{Binding Items}"
ToolTip="双击行可快速定位">
<b:Interaction.Triggers>
<b:EventTrigger EventName="MouseDoubleClick">
<b:InvokeCommandAction Command="{Binding ShowElementCommand}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}, Mode=FindAncestor}}" />
</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="类型或实例名称" />
<!--<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>-->
<!-- 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="房间" />
</DataGrid.Columns>
</DataGrid>
2025-08-26 21:33:20 +08:00
<UniformGrid
Grid.Row="1"
2024-09-22 11:05:41 +08:00
Grid.Column="0"
2025-04-24 20:56:44 +08:00
Grid.ColumnSpan="2"
2025-08-26 21:33:20 +08:00
Columns="1">
<n:Card Content="{Binding ProjectBasePoint, StringFormat=项目基点:{}{0}}" />
<n:Card Content="{Binding SharedBasePoint, StringFormat=测量点:{}{0}}" />
</UniformGrid>
2024-09-22 11:05:41 +08:00
<UniformGrid
2025-04-24 20:56:44 +08:00
Grid.Row="2"
2025-08-26 21:33:20 +08:00
Grid.Column="0"
2024-09-22 11:05:41 +08:00
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
2025-04-24 20:56:44 +08:00
Grid.Row="2"
2025-08-26 21:33:20 +08:00
Grid.Column="1"
2024-09-22 11:05:41 +08:00
Rows="2">
<UniformGrid Rows="2">
<TextBlock Text="{Binding ErrorCount, Mode=TwoWay, StringFormat=错误数量:{}{0}}" TextWrapping="WrapWithOverflow" />
<CheckBox Content="使用剖切框" IsChecked="{Binding UseSectionBox}" />
</UniformGrid>
<UniformGrid Rows="2">
2025-08-26 21:33:20 +08:00
<Button Command="{Binding CheckModelCommand}" Content="模型检查" />
<Button Command="{Binding ExportToExcelCommand}" Content="导出结果" />
2024-09-22 11:05:41 +08:00
<Button
Command="{Binding ModifyModelCommand}"
Content="矫正错误"
2025-08-26 21:33:20 +08:00
ToolTip="对参照标高进行修改、立管坡度修正" />
2024-09-22 11:05:41 +08:00
</UniformGrid>
</UniformGrid>
2025-08-26 21:33:20 +08:00
</n:Grid>
</n:NeoWindow>