整理代码
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
<ui:NeoWindow
|
||||
MinHeight="300"
|
||||
SizeToContent="Height"
|
||||
Title="保温层"
|
||||
Width="620"
|
||||
d:DataContext="{d:DesignInstance Type=local:AddInsulationViewModel}"
|
||||
mc:Ignorable="d"
|
||||
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.AddInsulationView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
Title="保温层"
|
||||
Width="620"
|
||||
MinHeight="300"
|
||||
d:DataContext="{d:DesignInstance Type=local:AddInsulationViewModel}"
|
||||
Icon="{DynamicResource RevitIcon}"
|
||||
SizeToContent="Height"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
||||
</Window.Resources>
|
||||
@@ -25,21 +26,21 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ui:StackPanel
|
||||
Grid.Column="0"
|
||||
Grid.RowSpan="2"
|
||||
IsEnabled="{Binding AddToPipe, Mode=TwoWay}"
|
||||
Grid.Column="0"
|
||||
Margin="5"
|
||||
IsEnabled="{Binding AddToPipe, Mode=TwoWay}"
|
||||
Spacing="5">
|
||||
<ComboBox
|
||||
DisplayMemberPath="Name"
|
||||
ui:SelectorAssist.Placeholder="管道系统类型"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding PipingSystemTypes}"
|
||||
SelectedItem="{Binding SelectedPipingSystemType}" />
|
||||
<DataGrid
|
||||
ui:StackPanel.Fill="Fill"
|
||||
AutoGenerateColumns="False"
|
||||
ItemsSource="{Binding PipeInsulationItems}"
|
||||
SelectionUnit="FullRow"
|
||||
ui:StackPanel.Fill="Fill">
|
||||
SelectionUnit="FullRow">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding MinDiameter}" Header="最小管径" />
|
||||
<DataGridTextColumn Binding="{Binding MaxDiameter}" Header="最大管径" />
|
||||
@@ -51,7 +52,7 @@
|
||||
ItemsSource="{Binding PipeInsulationTypes}"
|
||||
SelectedItemBinding="{Binding PipeInsulationType, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextBinding="{Binding PipeInsulationType.Name}" />-->
|
||||
<DataGridTemplateColumn Header="保温层材料" Width="*">
|
||||
<DataGridTemplateColumn Width="*" Header="保温层材料">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
@@ -68,41 +69,41 @@
|
||||
</ui:StackPanel>
|
||||
<ui:StackPanel
|
||||
Grid.Column="1"
|
||||
IsEnabled="{Binding AddToDuct, Mode=TwoWay}"
|
||||
Margin="5"
|
||||
IsEnabled="{Binding AddToDuct, Mode=TwoWay}"
|
||||
Spacing="5">
|
||||
<ComboBox
|
||||
DisplayMemberPath="Name"
|
||||
ui:SelectorAssist.Placeholder="风管系统类型:"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding DuctSystemTypes}"
|
||||
SelectedItem="{Binding SelectedDuctSystem}" />
|
||||
<ComboBox
|
||||
DisplayMemberPath="Name"
|
||||
ui:SelectorAssist.Placeholder="保温层类型:"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding DuctInsulationTypes}"
|
||||
SelectedItem="{Binding DuctInsulationItem.DuctInsulationType}" />
|
||||
<TextBox ui:SelectorAssist.Placeholder="保温层厚度:" Text="{Binding DuctInsulationItem.Thickness, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</ui:StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<CheckBox
|
||||
MinWidth="50"
|
||||
Margin="5"
|
||||
Content="管道"
|
||||
IsChecked="{Binding AddToPipe}"
|
||||
Margin="5"
|
||||
MinWidth="50" />
|
||||
IsChecked="{Binding AddToPipe}" />
|
||||
<CheckBox
|
||||
Content="风管"
|
||||
IsChecked="{Binding AddToDuct}"
|
||||
MinWidth="50"
|
||||
Margin="5"
|
||||
MinWidth="50" />
|
||||
Content="风管"
|
||||
IsChecked="{Binding AddToDuct}" />
|
||||
<Button
|
||||
Command="{Binding AddInsulationCommand}"
|
||||
Content="添加保温层"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Right" />
|
||||
HorizontalAlignment="Right"
|
||||
Command="{Binding AddInsulationCommand}"
|
||||
Content="添加保温层" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ui:NeoWindow>
|
||||
|
||||
Reference in New Issue
Block a user