整理代码

This commit is contained in:
ShrlAlgo
2025-10-10 11:19:58 +08:00
parent 4722a4c881
commit 9d40762f03
111 changed files with 3238 additions and 3112 deletions

View File

@@ -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>

View File

@@ -1,19 +1,20 @@
<ui:NeoWindow
Height="350"
MinHeight="350"
SizeToContent="Height"
Title="任意连接"
Width="270"
d:DataContext="{d:DesignInstance Type=local:AnyConnectViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.AnyConnectView"
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:system="clr-namespace:System;assembly=mscorlib"
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Title="任意连接"
Width="270"
Height="350"
MinHeight="350"
d:DataContext="{d:DesignInstance Type=local:AnyConnectViewModel}"
Icon="{DynamicResource RevitIcon}"
SizeToContent="Height"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
@@ -87,11 +88,11 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="自定义" x:Name="LbCustom" />
<RadioButton x:Name="LbCustom" Content="自定义" />
<TextBox
VerticalAlignment="Center"
IsEnabled="{Binding IsChecked, ElementName=LbCustom}"
Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center" />
Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" />
</UniformGrid>
</GroupBox>
<GroupBox Header="选择方式">
@@ -107,9 +108,9 @@
</UniformGrid>
</GroupBox>
<Button
Command="{Binding ConnectCommand}"
Content="连接管线"
HorizontalAlignment="Stretch"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=PlugConnect}" />
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=PlugConnect}"
Command="{Binding ConnectCommand}"
Content="连接管线" />
</ui:StackPanel>
</ui:NeoWindow>

View File

@@ -1,17 +1,18 @@
<ui:NeoWindow
MinHeight="180"
SizeToContent="Height"
Title="整理管线"
Width="270"
d:DataContext="{d:DesignInstance Type=local:ArrangeMEPCurveViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.ArrangeMEPCurveView"
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="270"
MinHeight="180"
d:DataContext="{d:DesignInstance Type=local:ArrangeMEPCurveViewModel}"
Icon="{DynamicResource RevitIcon}"
SizeToContent="Height"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
@@ -28,17 +29,17 @@
Text="{Binding Gap, UpdateSourceTrigger=PropertyChanged}" />
<UniformGrid Rows="1">
<RadioButton
MinWidth="50"
Content="管中心"
IsChecked="{Binding MEPCurveCenter}"
MinWidth="50" />
IsChecked="{Binding MEPCurveCenter}" />
<RadioButton
Content="管外壁/考虑保温层"
Content="管外壁"
IsChecked="{Binding MEPCurveCenter, Converter={StaticResource InvertBooleanConverter}}"
ToolTip="若无保温,则仅考虑管外壁" />
ToolTip="考虑保温层,若无保温,则仅考虑管外壁" />
</UniformGrid>
<Button
HorizontalAlignment="Stretch"
Command="{Binding ArrangeCommand}"
Content="整理"
HorizontalAlignment="Stretch" />
Content="整理" />
</ui:StackPanel>
</ui:NeoWindow>

View File

@@ -1,17 +1,17 @@
<StackPanel
Background="#FFE5F0D7"
Height="26"
Orientation="Horizontal"
d:DataContext="{d:DesignInstance Type=local:AnyConnectViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.AutoConnectOptionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:ShrlAlgoToolkit.Mvvm.Converters;assembly=ShrlAlgoToolkit.Mvvm"
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:system="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Height="26"
d:DataContext="{d:DesignInstance Type=local:AnyConnectViewModel}"
Background="#FFE5F0D7"
Orientation="Horizontal"
mc:Ignorable="d">
<StackPanel.Resources>
<converters:ComparisonConverter x:Key="ComparisonConverter" />
<converters:InvertBooleanConverter x:Key="InvertBooleanConverter" />
@@ -19,23 +19,23 @@
</StackPanel.Resources>
<TextBlock
Padding="10,0,10,0"
Text="任意管线 | 选项"
VerticalAlignment="Center" />
VerticalAlignment="Center"
Text="任意管线 | 选项" />
<Border
Width="3"
Background="Gray"
BorderBrush="Azure"
BorderThickness="1,0"
Width="3" />
BorderThickness="1,0" />
<TextBlock
Margin="10,0,10,0"
VerticalAlignment="Center"
Text="连接角度:"
ToolTip="平行或垂直连接时生效"
VerticalAlignment="Center" />
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
ToolTip="平行或垂直连接时生效" />
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<RadioButton
VerticalAlignment="Center"
Content="默认"
ToolTip="根据当前位置自动连接"
VerticalAlignment="Center">
ToolTip="根据当前位置自动连接">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
@@ -44,7 +44,7 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="15°" VerticalAlignment="Center">
<RadioButton VerticalAlignment="Center" Content="15°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
@@ -53,7 +53,7 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="22.5°" VerticalAlignment="Center">
<RadioButton VerticalAlignment="Center" Content="22.5°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
@@ -62,7 +62,7 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="30°" VerticalAlignment="Center">
<RadioButton VerticalAlignment="Center" Content="30°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
@@ -71,7 +71,7 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="45°" VerticalAlignment="Center">
<RadioButton VerticalAlignment="Center" Content="45°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
@@ -80,7 +80,7 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="60°" VerticalAlignment="Center">
<RadioButton VerticalAlignment="Center" Content="60°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
@@ -89,7 +89,7 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="90°" VerticalAlignment="Center">
<RadioButton VerticalAlignment="Center" Content="90°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
<Binding.ConverterParameter>
@@ -99,13 +99,13 @@
</RadioButton.IsChecked>
</RadioButton>
<RadioButton
Content="自定义:"
x:Name="LbCustom"
VerticalAlignment="Center"
x:Name="LbCustom" />
Content="自定义:" />
<TextBox
Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0}°}"
Width="80"
VerticalAlignment="Center"
Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=LbCustom}"
Width="80" />
Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged, StringFormat={}{0}°}"
Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=LbCustom}" />
</StackPanel>
</StackPanel>

View File

@@ -1,26 +1,27 @@
<ui:NeoWindow
Height="200"
MinWidth="220"
Title="线缆布置"
Width="220"
d:DataContext="{d:DesignInstance Type=electricDesign:CableLayoutViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.CableLayoutView"
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:electricDesign="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="220"
Height="200"
MinWidth="220"
d:DataContext="{d:DesignInstance Type=electricDesign:CableLayoutViewModel}"
Icon="{DynamicResource RevitIcon}"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
<ui:StackPanel Margin="5" Spacing="5">
<ComboBox
ui:SelectorAssist.Placeholder="线缆型号"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding Specifications}"
ui:InputAssist.Placeholder="线缆型号"
SelectedItem="{Binding SelectedConduitType, UpdateSourceTrigger=PropertyChanged}">
<b:Interaction.Triggers>
<b:EventTrigger EventName="SelectionChanged">
@@ -29,16 +30,16 @@
</b:Interaction.Triggers>
</ComboBox>
<ComboBox
ui:SelectorAssist.Placeholder="线缆线径"
DisplayMemberPath="Key"
ItemsSource="{Binding Sizes}"
ui:InputAssist.Placeholder="线缆线径"
SelectedValue="{Binding Size, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Value" />
<TextBox
InputMethod.IsInputMethodEnabled="False"
ui:InputAssist.Placeholder="线缆数量"
InputMethod.IsInputMethodEnabled="False"
Text="{Binding Count, UpdateSourceTrigger=PropertyChanged}" />
<Button Content="布置" HorizontalAlignment="Stretch">
<Button HorizontalAlignment="Stretch" Content="布置">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Click">
<b:InvokeCommandAction Command="{Binding CloseWinCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}}" />

View File

@@ -1,18 +1,19 @@
<ui:NeoWindow
Height="450"
MinHeight="450"
Title="碰撞报告"
Width="700"
d:DataContext="{d:DesignInstance Type=local:ClashReportViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.ClashReportView"
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: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="700"
Height="450"
MinHeight="450"
d:DataContext="{d:DesignInstance Type=local:ClashReportViewModel}"
Icon="{DynamicResource RevitIcon}"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
@@ -38,15 +39,15 @@
<DataGrid.Template>
<ControlTemplate>
<Border
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ScrollViewer
x:Name="DG_ScrollViewer"
CanContentScroll="True"
Focusable="false"
x:Name="DG_ScrollViewer">
Focusable="false">
<b:Interaction.Triggers>
<b:EventTrigger EventName="ScrollChanged">
<b:InvokeCommandAction Command="{Binding LvScrollCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type ScrollViewer}, Mode=FindAncestor}}" />
@@ -66,43 +67,43 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Button
Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
Command="{x:Static DataGrid.SelectAllCommand}"
Focusable="false"
Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle,
TypeInTargetAssembly={x:Type DataGrid}}}"
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
<DataGridColumnHeadersPresenter
x:Name="PART_ColumnHeadersPresenter"
Grid.Column="1"
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
x:Name="PART_ColumnHeadersPresenter" />
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
<ScrollContentPresenter
CanContentScroll="{TemplateBinding CanContentScroll}"
x:Name="PART_ScrollContentPresenter"
Grid.Row="1"
Grid.ColumnSpan="2"
Grid.Row="1"
x:Name="PART_ScrollContentPresenter" />
CanContentScroll="{TemplateBinding CanContentScroll}" />
<ScrollBar
Grid.Column="2"
x:Name="PART_VerticalScrollBar"
Grid.Row="1"
Grid.Column="2"
Maximum="{TemplateBinding ScrollableHeight}"
Orientation="Vertical"
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"
ViewportSize="{TemplateBinding ViewportHeight}"
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
x:Name="PART_VerticalScrollBar" />
<Grid Grid.Column="1" Grid.Row="2">
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
<Grid Grid.Row="2" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ScrollBar
x:Name="PART_HorizontalScrollBar"
Grid.Column="1"
Maximum="{TemplateBinding ScrollableWidth}"
Orientation="Horizontal"
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"
ViewportSize="{TemplateBinding ViewportWidth}"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
x:Name="PART_HorizontalScrollBar" />
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
</Grid>
</Grid>
</ControlTemplate>
@@ -129,13 +130,13 @@
ToolTip="只选中构件,不修改剖面框" />
</StackPanel>
<Button
Width="75"
Command="{Binding OpenFileCommand}"
Content="打开"
Width="75" />
Content="打开" />
<Button
Width="75"
Command="{Binding RefreshCommand}"
Content="刷新"
Width="75" />
Content="刷新" />
</ui:StackPanel>
</ui:Grid>
</ui:NeoWindow>

View File

@@ -1,13 +1,7 @@
<ui:NeoWindow
Height="450"
MinHeight="480"
MinWidth="320"
Title="避让处理"
Width="320"
d:DataContext="{d:DesignInstance Type=local:ClashResolveViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.ClashResolveView"
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:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
@@ -15,7 +9,14 @@
xmlns:rvMep="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Title="避让处理"
Width="320"
Height="450"
MinWidth="320"
MinHeight="480"
d:DataContext="{d:DesignInstance Type=local:ClashResolveViewModel}"
Icon="{DynamicResource RevitIcon}"
mc:Ignorable="d">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Closing">
<b:InvokeCommandAction Command="{Binding ClosingCommand}" />
@@ -82,12 +83,12 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="自定义" x:Name="LbCustom" />
<RadioButton x:Name="LbCustom" Content="自定义" />
<TextBox IsEnabled="{Binding IsChecked, ElementName=LbCustom}" Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" />
</UniformGrid>
</GroupBox>
<ui:StackPanel Orientation="Horizontal" Spacing="5">
<GroupBox Header="参考方式" ui:StackPanel.Fill="Fill">
<GroupBox ui:StackPanel.Fill="Fill" Header="参考方式">
<UniformGrid Rows="1">
<RadioButton
Content="手动"
@@ -99,7 +100,7 @@
ToolTip="选择相交的两条管线,将翻弯管线偏移一定距离" />
</UniformGrid>
</GroupBox>
<GroupBox Header="调整方式" ui:StackPanel.Fill="Fill">
<GroupBox ui:StackPanel.Fill="Fill" Header="调整方式">
<UniformGrid Rows="1">
<RadioButton Content="单侧" IsChecked="{Binding AdjustType, ConverterParameter={x:Static rvMep:AdjustType.OneSide}, Converter={StaticResource ComparisonConverter}}" />
<RadioButton Content="双侧" IsChecked="{Binding AdjustType, ConverterParameter={x:Static rvMep:AdjustType.TwoSide}, Converter={StaticResource ComparisonConverter}}" />
@@ -117,12 +118,12 @@
<TextBox
ui:InputAssist.Prefix="偏移量:"
ui:InputAssist.Suffix="mm"
Text="{Binding Offset, UpdateSourceTrigger=PropertyChanged}"
ui:StackPanel.Fill="Fill" />
ui:StackPanel.Fill="Fill"
Text="{Binding Offset, UpdateSourceTrigger=PropertyChanged}" />
<Button
Command="{Binding ResolveCommand}"
Content="调整"
HorizontalAlignment="Stretch"
ui:StackPanel.Fill="Fill" />
ui:StackPanel.Fill="Fill"
Command="{Binding ResolveCommand}"
Content="调整" />
</ui:StackPanel>
</ui:NeoWindow>

View File

@@ -1,5 +1,6 @@
<ui:NeoWindow
Height="800"
Icon="{DynamicResource RevitIcon}"
Title="净空检查"
Width="400"
d:DataContext="{d:DesignInstance local:HeadroomCheckViewModel}"
@@ -37,7 +38,7 @@
<DataGrid.Columns>
<DataGridCheckBoxColumn
Binding="{Binding IsSelected}"
ElementStyle="{StaticResource DataGridCheckBox}"
ElementStyle="{StaticResource DataGridCheckBoxStyle}"
Header="选择"
Width="60" />
<DataGridTextColumn
@@ -100,28 +101,28 @@
VerticalAlignment="Center"
Text="排除高度低的管线(mm)" />-->
<TextBox
ui:InputAssist.Placeholder="排除高度低的管线:"
MinWidth="120"
ui:InputAssist.Suffix="mm"
Text="1000" />
Text="1000"
ui:InputAssist.Placeholder="排除高度低的管线:"
ui:InputAssist.Suffix="mm" />
<!--<TextBlock
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="排除长度短的管线(mm)" />-->
<TextBox
ui:InputAssist.Placeholder="排除长度短的管线:"
MinWidth="120"
ui:InputAssist.Suffix="mm"
Text="500" />
Text="500"
ui:InputAssist.Placeholder="排除长度短的管线:"
ui:InputAssist.Suffix="mm" />
<!--<TextBlock
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="净高要求高度(mm)" />-->
<TextBox
ui:InputAssist.Placeholder="净高要求高度:"
MinWidth="120"
ui:InputAssist.Suffix="mm"
Text="2600" />
Text="2600"
ui:InputAssist.Placeholder="净高要求高度:"
ui:InputAssist.Suffix="mm" />
<Button
Command="{Binding AnalysisHeadroomCommand}"
Content="净高分析"

View File

@@ -1,19 +1,19 @@
<ui:NeoWindow
Height="310"
MinHeight="310"
MinWidth="250"
Title="移动管线"
Width="250"
d:DataContext="{d:DesignInstance Type=local:MoveMEPCurveViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.MoveMEPCurveView"
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: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="300"
Height="280"
d:DataContext="{d:DesignInstance Type=local:MoveMEPCurveViewModel}"
Icon="{DynamicResource RevitIcon}"
SizeToContent="Height"
mc:Ignorable="d">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Closing">
<b:InvokeCommandAction Command="{Binding ClosingCommand}" />
@@ -45,15 +45,15 @@
ToolTip="上下移动的距离(需要区分正负)或与参考的间距" />
<ui:StackPanel Orientation="Horizontal" Spacing="5">
<Button
HorizontalAlignment="Stretch"
ui:StackPanel.Fill="Fill"
Command="{Binding SelectCommand}"
Content="选择"
HorizontalAlignment="Stretch"
ui:StackPanel.Fill="Fill" />
Content="选择" />
<Button
Command="{Binding MoveCommand}"
Content="移动"
HorizontalAlignment="Stretch"
ui:StackPanel.Fill="Fill" />
ui:StackPanel.Fill="Fill"
Command="{Binding MoveCommand}"
Content="移动" />
</ui:StackPanel>
</ui:StackPanel>
</ui:NeoWindow>

View File

@@ -1,14 +1,7 @@
<ui:NeoWindow
Height="280"
MinHeight="280"
MinWidth="250"
SizeToContent="Height"
Title="旋转模型"
Width="250"
d:DataContext="{d:DesignInstance Type={x:Type rvMep:RotateMEPViewModel}}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.RotateMEPView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
@@ -16,14 +9,20 @@
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:rvMep="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Title="旋转模型"
Width="300"
Height="220"
d:DataContext="{d:DesignInstance Type={x:Type rvMep:RotateMEPViewModel}}"
Icon="{DynamicResource RevitIcon}"
SizeToContent="Height"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
<ui:StackPanel Margin="5" Spacing="5">
<GroupBox
Grid.Column="0"
Grid.Row="0"
Grid.Column="0"
Header="角度(°)">
<UniformGrid Columns="3" Rows="3">
<RadioButton Content="15°">
@@ -80,22 +79,22 @@
</Binding>
</RadioButton.IsChecked>
</RadioButton>
<RadioButton Content="自定义" x:Name="LbCustom" />
<RadioButton x:Name="LbCustom" Content="自定义" />
<TextBox Text="{Binding Angle, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding IsChecked, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}, ElementName=LbCustom}" />
</UniformGrid>
</GroupBox>
<CheckBox
Content="是否单选"
Grid.Column="0"
Grid.Row="1"
Grid.Column="0"
Content="是否单选"
IsChecked="{Binding IsSingleSelect}"
ToolTip="单选构件,取消则可以多选构件" />
<Button
Grid.Row="2"
Grid.Column="0"
HorizontalAlignment="Stretch"
Command="{Binding RotateInstanceCommand}"
Content="旋转"
Grid.Column="0"
Grid.Row="2"
HorizontalAlignment="Stretch"
ToolTip="当选中构件时,则直接旋转,未选中时,则根据选项决定是多选还是单选" />
</ui:StackPanel>
</ui:NeoWindow>

View File

@@ -1,21 +1,22 @@
<ui:NeoWindow
Height="320"
MinHeight="320"
MinWidth="300"
SizeToContent="Height"
Title="创建立管"
Width="300"
WindowStartupLocation="CenterOwner"
d:DataContext="{d:DesignInstance Type=rvMep:StandMepCurveViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvMEP.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:rvMep="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvMEP"
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Title="创建立管"
Width="300"
Height="200"
MinWidth="300"
MinHeight="200"
d:DataContext="{d:DesignInstance Type=rvMep:StandMepCurveViewModel}"
Icon="{DynamicResource RevitIcon}"
SizeToContent="Height"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d">
<b:Interaction.Triggers>
<!--<b:EventTrigger EventName="Deactivated">
<b:InvokeCommandAction Command="{Binding CreateMepCurveCommand}" />
@@ -31,66 +32,66 @@
<ui:StackPanel Spacing="5">
<UniformGrid Rows="1">
<RadioButton
x:Name="RbPipe"
Content="水管"
IsChecked="{Binding IsPipe}"
x:Name="RbPipe" />
IsChecked="{Binding IsPipe}" />
<RadioButton
x:Name="RbDuct"
Content="风管"
IsChecked="{Binding IsDuct}"
x:Name="RbDuct" />
IsChecked="{Binding IsDuct}" />
<RadioButton
x:Name="RbCableTray"
Content="桥架"
IsChecked="{Binding IsCableTray}"
x:Name="RbCableTray" />
IsChecked="{Binding IsCableTray}" />
<RadioButton
x:Name="RbConduit"
Content="线管"
IsChecked="{Binding IsConduit}"
x:Name="RbConduit" />
IsChecked="{Binding IsConduit}" />
</UniformGrid>
<ui:StackPanel Spacing="5" Visibility="{Binding IsPipe, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}">
<ComboBox
ui:SelectorAssist.Placeholder="&lt;管道类型&gt;"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding PipeTypes}"
ui:InputAssist.Placeholder="&lt;管道类型&gt;"
SelectedItem="{Binding SelectedPipeType}" />
<ComboBox
ui:SelectorAssist.Placeholder="&lt;系统类型&gt;"
DisplayMemberPath="Name"
ItemsSource="{Binding PipeSystemTypes}"
ui:InputAssist.Placeholder="&lt;系统类型&gt;"
SelectedItem="{Binding SelectedPipeSystemType}" />
</ui:StackPanel>
<ui:StackPanel Spacing="5" Visibility="{Binding IsDuct, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}">
<ComboBox
ui:SelectorAssist.Placeholder="&lt;风管类型&gt;"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding DuctTypes}"
ui:InputAssist.Placeholder="&lt;风管类型&gt;"
SelectedItem="{Binding SelectedDuctType}" />
<ComboBox
ui:SelectorAssist.Placeholder="&lt;系统类型&gt;"
DisplayMemberPath="Name"
ItemsSource="{Binding DuctSystemTypes}"
ui:InputAssist.Placeholder="&lt;系统类型&gt;"
SelectedItem="{Binding SelectedDuctSystemType}" />
</ui:StackPanel>
<ComboBox
ui:SelectorAssist.Placeholder="&lt;线管类型&gt;"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding ConduitTypes}"
ui:InputAssist.Placeholder="&lt;线管类型&gt;"
SelectedItem="{Binding SelectedConduitType}"
Visibility="{Binding IsConduit, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}" />
<ComboBox
ui:SelectorAssist.Placeholder="&lt;桥架类型&gt;"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding CableTrayTypes}"
ui:InputAssist.Placeholder="&lt;桥架类型&gt;"
SelectedItem="{Binding SelectedCableTrayType}"
Visibility="{Binding IsCableTray, Converter={x:Static ui:BooleanToVisibilityConverter.CollapsedInstance}}" />
</ui:StackPanel>
<Button
Command="{Binding CreateMepCurveCommand}"
Content="创建立管"
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom" />
VerticalAlignment="Bottom"
Command="{Binding CreateMepCurveCommand}"
Content="创建立管" />
</ui:StackPanel>
</ui:NeoWindow>