更新整理

This commit is contained in:
GG Z
2025-04-24 20:56:44 +08:00
parent 155cef46f8
commit 5b6d67b571
813 changed files with 14437 additions and 12362 deletions

View File

@@ -1,10 +1,9 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System.Windows.Media;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using System.Windows.Media;
namespace ShrlAlgo.RvKits.Windows
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
public partial class ColorPickerViewModel : ObservableObject
{

View File

@@ -1,19 +1,18 @@
<ui:FluentWindowEx
x:Class="ShrlAlgo.RvKits.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:ShrlAlgo.RvKits.Windows"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
Height="390"
Title="颜色设置"
Width="340"
Height="390"
d:DataContext="{d:DesignInstance Type=local2:ColorPickerViewModel}"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d">
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: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/WPFluent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
@@ -37,15 +36,15 @@
</b:Interaction.Triggers>
</controls:StandardColorPicker>-->
<ui:ColorPicker
x:Name="ColorPicker"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
SelectedColor="{Binding SelectedColor}" />
SelectedColor="{Binding SelectedColor}"
x:Name="ColorPicker" />
<StackPanel
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="1"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button

View File

@@ -1,6 +1,4 @@
using System.Windows;
namespace ShrlAlgo.RvKits.Windows;
namespace ShrlAlgoToolkit.RevitAddins.Windows;
/// <summary>
/// ColorPickerWin.xaml 的交互逻辑

View File

@@ -1,7 +1,7 @@
using Autodesk.Revit.DB;
namespace ShrlAlgo.RvKits.Windows;
namespace ShrlAlgoToolkit.RevitAddins.Windows;
/// <summary>
/// 错误的条目

View File

@@ -1,14 +1,11 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Nice3point.Revit.Toolkit.External.Handlers;
namespace ShrlAlgo.RvKits.Windows;
namespace ShrlAlgoToolkit.RevitAddins.Windows;
public partial class MessageViewModel : ObservableObject
{

View File

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

View File

@@ -1,8 +1,6 @@
using System.Windows;
using WPFluent.Controls;
using WPFluent.Controls;
namespace ShrlAlgo.RvKits.Windows
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
/// <summary>
/// MessageWin.xaml 的交互逻辑

View File

@@ -1,12 +1,10 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace ShrlAlgo.RvKits.Windows
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
public partial class NavigateViewViewModel : ObservableObject
{

View File

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

View File

@@ -1,6 +1,4 @@
using System.Windows;
namespace ShrlAlgo.RvKits.Windows
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
/// <summary>
/// NavigateViewWin.xaml 的交互逻辑

View File

@@ -1,17 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using ShrlAlgoToolkit.Core.Assists;
using ShrlAlgo.Toolkit.Core.Assist;
using ShrlAlgoToolkit.Core.Assist;
namespace ShrlAlgo.RvKits.Windows
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
class ProcessEventHandler<T> : IExternalEventHandler
{
@@ -82,12 +73,12 @@ namespace ShrlAlgo.RvKits.Windows
{
ts.RollBack();
}
LogHelper.ToLog(ex.Message);
LogAssist.ToLog(ex.Message);
return;
}
//await Task.Delay(50);
//ViewModel.CurrentContext = $"处理 {ViewModel.CurrentValue} / {ViewModel.MaxValue} 完成";
ProgressBarView.Dispatcher.Invoke(() => ViewModel.CurrentContext = $"处理 {ViewModel.CurrentValue} / {ViewModel.MaxValue} 完成", System.Windows.Threading.DispatcherPriority.Background);
ProgressBarView.Dispatcher.Invoke<string>(() => ViewModel.CurrentContext = $"处理 {ViewModel.CurrentValue} / {ViewModel.MaxValue} 完成", System.Windows.Threading.DispatcherPriority.Background);
//ProgressBarView.Dispatcher.Invoke(ViewModel.NotifyUI, System.Windows.Threading.DispatcherPriority.Background);
}

View File

@@ -1,20 +1,7 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace ShrlAlgo.RvKits.Windows
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
class ProgressBarManager<T>
{

View File

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

View File

@@ -1,18 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows;
namespace ShrlAlgo.RvKits.Windows
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
/// <summary>
/// Interaction logic for ProgressMonitorView.xaml

View File

@@ -1,15 +1,6 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ShrlAlgo.RvKits.Windows
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
partial class ProgressMonitorViewModel : ObservableObject
{