调整代码
This commit is contained in:
147
ShrlAlgoToolkit.RevitAddins/Mep/HeadroomCheckView.xaml
Normal file
147
ShrlAlgoToolkit.RevitAddins/Mep/HeadroomCheckView.xaml
Normal file
@@ -0,0 +1,147 @@
|
||||
<ui:MelWindow
|
||||
x:Class="ShrlAlgoToolkit.RevitAddins.Mep.HeadroomCheckView"
|
||||
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:conv="clr-namespace:ShrlAlgoToolkit.RevitAddins.Common.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local1="clr-namespace:ShrlAlgoToolkit.RevitAddins.Mep"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
|
||||
Title="净空检查"
|
||||
Width="400"
|
||||
Height="800"
|
||||
d:DataContext="{d:DesignInstance local1:HeadroomCheckViewModel}"
|
||||
Icon="{DynamicResource RevitIcon}"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<DataGrid
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Height="200"
|
||||
Margin="5"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
ItemsSource="{Binding Rooms}"
|
||||
SelectionMode="Extended">
|
||||
<DataGrid.Columns>
|
||||
<DataGridCheckBoxColumn
|
||||
Width="60"
|
||||
Binding="{Binding IsSelected}"
|
||||
ElementStyle="{StaticResource DataGridCheckBoxStyle}"
|
||||
Header="选择" />
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding Name}"
|
||||
Header="房间名称"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTemplateColumn Header="颜色" IsReadOnly="True">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Border Background="{Binding Color, Converter={x:Static conv:Rv2WinColorConverter.Instance}}" ToolTip="生成三维房间时的颜色" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" />
|
||||
<DataGrid
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Height="340"
|
||||
Margin="5"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding ErrorModels}"
|
||||
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.Columns>
|
||||
<DataGridTextColumn Binding="{Binding Element.Category.Name}" Header="类别名称" />
|
||||
<DataGridTextColumn Binding="{Binding Element.Name}" Header="元素名称" />
|
||||
<DataGridTextColumn Binding="{Binding Level.Name}" Header="主体" />
|
||||
<DataGridTextColumn Binding="{Binding Element.Id}" Header="元素Id" />
|
||||
<DataGridTextColumn Binding="{Binding ErrorMessage}" Header="错误信息" />
|
||||
<DataGridTemplateColumn Header="操作">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<!-- 按钮参数绑定到当前行的绑定的Item -->
|
||||
<Button
|
||||
Command="{Binding DataContext.ShowElementCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="定位构件" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<!-- 树状结构,按楼层=>专业=>管线 -->
|
||||
<GridSplitter Grid.Row="3" HorizontalAlignment="Stretch" />
|
||||
<ui:StackPanel
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Margin="5"
|
||||
Spacing="5">
|
||||
<!--<TextBlock
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="排除高度低的管线(mm):" />-->
|
||||
<TextBox
|
||||
MinWidth="120"
|
||||
ui:InputAssist.PlaceholderText="排除高度低的管线:"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
Text="1000" />
|
||||
<!--<TextBlock
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="排除长度短的管线(mm):" />-->
|
||||
<TextBox
|
||||
MinWidth="120"
|
||||
ui:InputAssist.PlaceholderText="排除长度短的管线:"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
Text="500" />
|
||||
<!--<TextBlock
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="净高要求高度(mm):" />-->
|
||||
<TextBox
|
||||
MinWidth="120"
|
||||
ui:InputAssist.PlaceholderText="净高要求高度:"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
Text="2600" />
|
||||
<Button
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding AnalysisHeadroomCommand}"
|
||||
Content="净高分析"
|
||||
ToolTip="得到净高分析的平面以及不满足净高要求的管线" />
|
||||
<!--<Button
|
||||
Command="{Binding FindOverCommand}"
|
||||
Content="查询管线"
|
||||
ToolTip="根据净高要求查询" />-->
|
||||
<Button
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding ResetRoomHeightCommand}"
|
||||
Content="重设高度"
|
||||
ToolTip="重新设置房间高度为4000mm,避免影响平面查看" />
|
||||
<Button
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding GenerateRoom3DCommand}"
|
||||
Content="房间实体"
|
||||
ToolTip="生成三维房间实体" />
|
||||
</ui:StackPanel>
|
||||
</Grid>
|
||||
</ui:MelWindow>
|
||||
Reference in New Issue
Block a user