74 lines
3.9 KiB
Plaintext
74 lines
3.9 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.MEPTools.AddInsulationView"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:ex="https://github.com/sherlockforrest/Wpf.Ui.Extend"
|
||
|
|
xmlns:local="clr-namespace:Szmedi.RvKits.MEPTools"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
Title="保温层"
|
||
|
|
Width="620"
|
||
|
|
d:DataContext="{d:DesignInstance Type=local:AddInsulationViewModel}"
|
||
|
|
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" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<StackPanel
|
||
|
|
Grid.RowSpan="2"
|
||
|
|
Grid.Column="0"
|
||
|
|
Margin="5"
|
||
|
|
IsEnabled="{Binding AddToPipe, Mode=TwoWay}">
|
||
|
|
<TextBlock Text="管道系统类型:" />
|
||
|
|
<ComboBox DisplayMemberPath="Name" ItemsSource="{Binding PipingSystemTypes}" SelectedItem="{Binding SelectedPipingSystemType}" />
|
||
|
|
<DataGrid AutoGenerateColumns="False" ItemsSource="{Binding PipeInsulationItems}" SelectionUnit="FullRow">
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<DataGridTextColumn Binding="{Binding MinDiameter}" Header="最小管径" />
|
||
|
|
<DataGridTextColumn Binding="{Binding MaxDiameter}" Header="最大管径" />
|
||
|
|
<DataGridTextColumn Binding="{Binding Thickness}" Header="保温层厚度" />
|
||
|
|
<DataGridTemplateColumn Header="保温层材料">
|
||
|
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<StackPanel>
|
||
|
|
<ComboBox DisplayMemberPath="Name" ItemsSource="{Binding DataContext.PipeInsulationTypes, RelativeSource={RelativeSource AncestorType={x:Type controls:MaterialWindow}, Mode=FindAncestor}}" SelectedItem="{Binding PipeInsulationType, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
|
</StackPanel>
|
||
|
|
</DataTemplate>
|
||
|
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
|
</DataGridTemplateColumn>
|
||
|
|
</DataGrid.Columns>
|
||
|
|
</DataGrid>
|
||
|
|
</StackPanel>
|
||
|
|
<StackPanel Grid.Column="1" Margin="5" IsEnabled="{Binding AddToDuct, Mode=TwoWay}">
|
||
|
|
<TextBlock Text="风管系统类型:" />
|
||
|
|
<ComboBox DisplayMemberPath="Name" ItemsSource="{Binding DuctSystemTypes}" SelectedItem="{Binding SelectedDuctSystem}" />
|
||
|
|
<TextBlock Text="保温层类型:" />
|
||
|
|
<ComboBox DisplayMemberPath="Name" ItemsSource="{Binding DuctInsulationTypes}" SelectedItem="{Binding DuctInsulationItem.DuctInsulationType}" />
|
||
|
|
<TextBlock Text="保温层厚度:" />
|
||
|
|
<TextBox Text="{Binding DuctInsulationItem.Thickness, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
|
</StackPanel>
|
||
|
|
<StackPanel
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="1"
|
||
|
|
Margin="5"
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Orientation="Horizontal">
|
||
|
|
<CheckBox Content="管道" IsChecked="{Binding AddToPipe}" />
|
||
|
|
<CheckBox Content="风管" IsChecked="{Binding AddToDuct}" />
|
||
|
|
<Button
|
||
|
|
Grid.Row="1"
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Command="{Binding AddInsulationCommand}"
|
||
|
|
Content="添加保温层" />
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</controls:MaterialWindow>
|