Files
Shrlalgo.RvKits/ShrlAlgoToolkit.RevitAddins/Mep/StandMepCurveView.xaml
2026-02-22 20:03:42 +08:00

97 lines
4.6 KiB
XML

<ui:MelWindow
x:Class="ShrlAlgoToolkit.RevitAddins.Mep.StandMepCurveView"
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:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:rvMep1="clr-namespace:ShrlAlgoToolkit.RevitAddins.Mep"
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
Title="创建立管"
Width="300"
Height="200"
MinWidth="300"
MinHeight="200"
d:DataContext="{d:DesignInstance Type=rvMep1:StandMepCurveViewModel}"
Icon="{DynamicResource RevitIcon}"
SizeToContent="Height"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d">
<b:Interaction.Triggers>
<!--<b:EventTrigger EventName="Deactivated">
<b:InvokeCommandAction Command="{Binding CreateMepCurveCommand}" />
</b:EventTrigger>-->
<b:EventTrigger EventName="Closing">
<b:InvokeCommandAction Command="{Binding CancelCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
<ui:StackPanel Margin="5" Spacing="5">
<ui:StackPanel Spacing="5">
<UniformGrid Rows="1">
<RadioButton
x:Name="RbPipe"
Content="水管"
IsChecked="{Binding IsPipe}" />
<RadioButton
x:Name="RbDuct"
Content="风管"
IsChecked="{Binding IsDuct}" />
<RadioButton
x:Name="RbCableTray"
Content="桥架"
IsChecked="{Binding IsCableTray}" />
<RadioButton
x:Name="RbConduit"
Content="线管"
IsChecked="{Binding IsConduit}" />
</UniformGrid>
<ui:StackPanel Spacing="5" Visibility="{Binding IsPipe, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}">
<ComboBox
ui:InputAssist.PlaceholderText="&lt;管道类型&gt;"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding PipeTypes}"
SelectedItem="{Binding SelectedPipeType}" />
<ComboBox
ui:InputAssist.PlaceholderText="&lt;系统类型&gt;"
DisplayMemberPath="Name"
ItemsSource="{Binding PipeSystemTypes}"
SelectedItem="{Binding SelectedPipeSystemType}" />
</ui:StackPanel>
<ui:StackPanel Spacing="5" Visibility="{Binding IsDuct, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}">
<ComboBox
ui:InputAssist.PlaceholderText="&lt;风管类型&gt;"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding DuctTypes}"
SelectedItem="{Binding SelectedDuctType}" />
<ComboBox
ui:InputAssist.PlaceholderText="&lt;系统类型&gt;"
DisplayMemberPath="Name"
ItemsSource="{Binding DuctSystemTypes}"
SelectedItem="{Binding SelectedDuctSystemType}" />
</ui:StackPanel>
<ComboBox
ui:InputAssist.PlaceholderText="&lt;线管类型&gt;"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding ConduitTypes}"
SelectedItem="{Binding SelectedConduitType}"
Visibility="{Binding IsConduit, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}" />
<ComboBox
ui:InputAssist.PlaceholderText="&lt;桥架类型&gt;"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding CableTrayTypes}"
SelectedItem="{Binding SelectedCableTrayType}"
Visibility="{Binding IsCableTray, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}" />
</ui:StackPanel>
<Button
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"
Command="{Binding CreateMepCurveCommand}"
Content="创建立管" />
</ui:StackPanel>
</ui:MelWindow>