2026-01-02 17:30:41 +08:00
|
|
|
<ui:MelWindow
|
2025-04-24 20:56:44 +08:00
|
|
|
x:Class="ShrlAlgoToolkit.RevitAddins.RvView.SectionBoxControllerView"
|
2024-09-22 11:05:41 +08:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2025-10-10 11:19:58 +08:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2024-09-22 11:05:41 +08:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2025-04-24 20:56:44 +08:00
|
|
|
xmlns:rvManager="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvView"
|
|
|
|
|
xmlns:rvView="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvView"
|
2026-01-02 17:30:41 +08:00
|
|
|
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
|
2025-10-10 11:19:58 +08:00
|
|
|
Title="剖面框"
|
|
|
|
|
Width="340"
|
|
|
|
|
Height="360"
|
|
|
|
|
MinWidth="340"
|
|
|
|
|
MinHeight="360"
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=rvManager:SectionBoxControllerViewModel}"
|
|
|
|
|
Icon="{DynamicResource RevitIcon}"
|
|
|
|
|
mc:Ignorable="d">
|
2024-09-22 11:05:41 +08:00
|
|
|
<Window.Resources>
|
2025-04-24 20:56:10 +08:00
|
|
|
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
2024-09-22 11:05:41 +08:00
|
|
|
</Window.Resources>
|
2025-08-20 12:10:35 +08:00
|
|
|
<ui:Grid
|
2024-09-22 11:05:41 +08:00
|
|
|
ChildMargin="5"
|
|
|
|
|
Columns="*,*"
|
|
|
|
|
Rows="*,Auto,Auto,Auto">
|
|
|
|
|
<GroupBox Grid.ColumnSpan="2">
|
|
|
|
|
<GroupBox.Header>
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2025-08-25 17:30:53 +08:00
|
|
|
<ui:IconElement Symbol="History" />
|
2024-09-22 11:05:41 +08:00
|
|
|
<TextBlock Margin="5,0,0,0" Text="历史记录" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</GroupBox.Header>
|
|
|
|
|
<ListBox
|
2025-10-10 11:19:58 +08:00
|
|
|
x:Name="HistoryListBox"
|
2025-04-24 20:56:44 +08:00
|
|
|
HorizontalContentAlignment="Center"
|
|
|
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
2025-10-10 11:19:58 +08:00
|
|
|
DisplayMemberPath="Name"
|
|
|
|
|
ItemsSource="{Binding BoundingBoxes}"
|
|
|
|
|
SelectedValuePath="Bounding" />
|
2024-09-22 11:05:41 +08:00
|
|
|
</GroupBox>
|
2025-10-10 11:19:58 +08:00
|
|
|
<Grid Grid.Row="1" Grid.ColumnSpan="2">
|
2024-09-22 11:05:41 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="auto" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<GroupBox Header="设置方式">
|
|
|
|
|
<UniformGrid Rows="1">
|
|
|
|
|
<RadioButton
|
|
|
|
|
Content="元素"
|
2025-04-24 20:56:44 +08:00
|
|
|
IsChecked="{Binding SectionBoxType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static rvView:SectionBoxType.Element}}"
|
2024-09-22 11:05:41 +08:00
|
|
|
ToolTip="根据选择元素设置剖面框" />
|
|
|
|
|
<RadioButton
|
|
|
|
|
Content="框选"
|
2025-04-24 20:56:44 +08:00
|
|
|
IsChecked="{Binding SectionBoxType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static rvView:SectionBoxType.Rectangle}}"
|
2024-09-22 11:05:41 +08:00
|
|
|
ToolTip="根据框选范围设置剖面框" />
|
|
|
|
|
<RadioButton
|
|
|
|
|
Content="剖面"
|
2025-04-24 20:56:44 +08:00
|
|
|
IsChecked="{Binding SectionBoxType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static rvView:SectionBoxType.ViewSection}}"
|
2024-09-22 11:05:41 +08:00
|
|
|
ToolTip="根据剖面的范围设置剖面框" />
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
</GroupBox>
|
|
|
|
|
<CheckBox
|
|
|
|
|
Grid.Column="1"
|
2025-10-10 11:19:58 +08:00
|
|
|
Margin="5"
|
2024-09-22 11:05:41 +08:00
|
|
|
HorizontalAlignment="Center"
|
2025-10-10 11:19:58 +08:00
|
|
|
Content="是否延展"
|
2024-09-22 11:05:41 +08:00
|
|
|
IsChecked="{Binding NeedExtend}"
|
|
|
|
|
ToolTip="是否延展剖面框边界" />
|
|
|
|
|
</Grid>
|
2025-08-20 12:10:35 +08:00
|
|
|
<Button
|
2025-10-10 11:19:58 +08:00
|
|
|
Grid.Row="2"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
2025-12-23 21:35:54 +08:00
|
|
|
ui:ControlAssist.Icon="{ui:Icon SymbolValue=Add}"
|
2024-09-22 11:05:41 +08:00
|
|
|
Command="{Binding RecordSectionBoxCommand}"
|
|
|
|
|
Content="临时记录"
|
2025-10-10 11:19:58 +08:00
|
|
|
ToolTip="记录剖面框,以便复用" />
|
|
|
|
|
<Button
|
2025-04-24 20:56:44 +08:00
|
|
|
Grid.Row="2"
|
2025-10-10 11:19:58 +08:00
|
|
|
Grid.Column="1"
|
2025-04-24 20:56:44 +08:00
|
|
|
HorizontalAlignment="Stretch"
|
2025-12-23 21:35:54 +08:00
|
|
|
ui:ControlAssist.Icon="{ui:Icon SymbolValue=Delete}"
|
2024-09-22 11:05:41 +08:00
|
|
|
Command="{Binding RemoveSectionBoxCommand}"
|
|
|
|
|
CommandParameter="{Binding SelectedItem, ElementName=HistoryListBox}"
|
|
|
|
|
Content="删除记录"
|
2025-10-10 11:19:58 +08:00
|
|
|
ToolTip="删除已记录的剖面框" />
|
2025-08-20 12:10:35 +08:00
|
|
|
<Button
|
2025-10-10 11:19:58 +08:00
|
|
|
Grid.Row="3"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
2025-12-23 21:35:54 +08:00
|
|
|
ui:ControlAssist.Icon="{ui:Icon SymbolValue=KeyboardReturn}"
|
2024-09-22 11:05:41 +08:00
|
|
|
Command="{Binding UpdateSectionBoxCommand}"
|
|
|
|
|
CommandParameter="{Binding SelectedValue, ElementName=HistoryListBox}"
|
|
|
|
|
Content="恢复剖面框"
|
2025-10-10 11:19:58 +08:00
|
|
|
ToolTip="返回历史记录的剖面框" />
|
|
|
|
|
<Button
|
2025-04-24 20:56:44 +08:00
|
|
|
Grid.Row="3"
|
2025-10-10 11:19:58 +08:00
|
|
|
Grid.Column="1"
|
2025-04-24 20:56:44 +08:00
|
|
|
HorizontalAlignment="Stretch"
|
2025-12-23 21:35:54 +08:00
|
|
|
ui:ControlAssist.Icon="{ui:Icon SymbolValue=Box}"
|
2024-09-22 11:05:41 +08:00
|
|
|
Command="{Binding ResetSectionBoxCommand}"
|
|
|
|
|
Content="设置剖面框"
|
2025-10-10 11:19:58 +08:00
|
|
|
ToolTip="重新设置新的剖面框" />
|
2025-08-20 12:10:35 +08:00
|
|
|
</ui:Grid>
|
2026-01-02 17:30:41 +08:00
|
|
|
</ui:MelWindow>
|