整理代码

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,18 +1,19 @@
<ui:NeoWindow
Height="390"
Title="颜色设置"
Width="340"
WindowStartupLocation="CenterOwner"
d:DataContext="{d:DesignInstance Type=local2:ColorPickerViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.Windows.ColorPickerWin"
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:local2="clr-namespace:ShrlAlgoToolkit.RevitAddins.Windows"
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="340"
Height="390"
d:DataContext="{d:DesignInstance Type=local2:ColorPickerViewModel}"
Icon="{DynamicResource RevitIcon}"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
@@ -35,16 +36,16 @@
</b:EventTrigger>
</b:Interaction.Triggers>
</controls:StandardColorPicker>-->
<ui:ColorPicker
Grid.Column="0"
Grid.ColumnSpan="2"
<ui:ColorPanel
x:Name="ColorPicker"
Grid.Row="0"
SelectedColor="{Binding SelectedColor}"
x:Name="ColorPicker" />
<StackPanel
Grid.Column="0"
Grid.ColumnSpan="2"
SelectedColor="{Binding SelectedColor}" />
<StackPanel
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button

View File

@@ -1,17 +1,18 @@
<ui:NeoWindow
Height="450"
Title="{Binding WinTitle}"
Width="800"
d:DataContext="{d:DesignInstance Type=local1:MessageViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.Windows.MessageWin"
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:local1="clr-namespace:ShrlAlgoToolkit.RevitAddins.Windows"
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="{Binding WinTitle}"
Width="800"
Height="450"
d:DataContext="{d:DesignInstance Type=local1:MessageViewModel}"
Icon="{DynamicResource RevitIcon}"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
@@ -20,12 +21,12 @@
</Window.DataContext>-->
<ui:StackPanel Margin="5" Spacing="5">
<DataGrid
ui:StackPanel.Fill="Fill"
AutoGenerateColumns="False"
CanUserAddRows="False"
IsReadOnly="True"
ItemsSource="{Binding ErrorModels}"
ToolTip="双击行可快速定位"
ui:StackPanel.Fill="Fill">
ToolTip="双击行可快速定位">
<b:Interaction.Triggers>
<b:EventTrigger EventName="MouseDoubleClick">
<b:InvokeCommandAction Command="{Binding ShowElementCommand}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}" />
@@ -51,7 +52,7 @@
</DataGrid.Columns>
</DataGrid>
<ui:StackPanel Grid.Row="1" Orientation="Horizontal">
<ui:Heading Text="注:错误需人处理、或无法处理" ui:StackPanel.Fill="Fill" />
<ui:Heading ui:StackPanel.Fill="Fill" Text="注:错误需人处理、或无法处理" />
<TextBlock Text="{Binding Count, StringFormat=错误数量:{0}}" />
<TextBlock Text="{Binding Footer}" />
</ui:StackPanel>

View File

@@ -1,17 +1,18 @@
<ui:NeoWindow
Height="200"
Title="选择视图"
Width="300"
d:DataContext="{d:DesignInstance Type=sControls3:NavigateViewViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.Windows.NavigateViewWin"
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:sControls3="clr-namespace:ShrlAlgoToolkit.RevitAddins.Windows"
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Title="选择视图"
Width="300"
Height="200"
d:DataContext="{d:DesignInstance Type=sControls3:NavigateViewViewModel}"
Icon="{DynamicResource RevitIcon}"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>

View File

@@ -1,18 +1,19 @@
<Window
Background="{DynamicResource MaterialDesign.Brush.Background}"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
TextElement.Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
Title="{Binding Title}"
WindowStartupLocation="CenterScreen"
d:DataContext="{d:DesignInstance Type=controls:ProgressMonitorViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.Windows.ProgressMonitorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ShrlAlgoToolkit.RevitAddins.Windows"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Title="{Binding Title}"
d:DataContext="{d:DesignInstance Type=controls:ProgressMonitorViewModel}"
Background="{DynamicResource MaterialDesign.Brush.Background}"
Icon="{DynamicResource RevitIcon}"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
TextElement.Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
</Window.Resources>
@@ -20,15 +21,15 @@
<TextBlock Text="{Binding CurrentContext}" />
<Separator />
<ProgressBar
Width="300"
Height="23"
Maximum="{Binding MaxValue}"
Value="{Binding CurrentValue}"
Width="300" />
Value="{Binding CurrentValue}" />
<Separator />
<Button
Content="取消"
x:Name="btnCancel"
HorizontalAlignment="Right"
IsCancel="True"
x:Name="btnCancel" />
Content="取消"
IsCancel="True" />
</StackPanel>
</Window>