命名优化,达芬奇字体修改工具

This commit is contained in:
GG Z
2025-10-04 08:52:23 +08:00
parent 0d0afbc78e
commit 4722a4c881
121 changed files with 1801 additions and 1368 deletions

View File

@@ -36,7 +36,7 @@ public class AdaptiveMEPTagCmd : ExternalCommand
}
}
Document.Invoke(
ts =>
_ =>
{
foreach (var item in toRotate)
{

View File

@@ -16,19 +16,15 @@
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
<ui:StackPanel Margin="5" Spacing="5">
<UniformGrid Grid.Row="0" Rows="1">
<UniformGrid Rows="1">
<RadioButton Content="手动" IsChecked="{Binding IsAutomatic, Converter={StaticResource InvertBooleanConverter}}" />
<RadioButton Content="自动" IsChecked="{Binding IsAutomatic, UpdateSourceTrigger=PropertyChanged}" />
</UniformGrid>
<TextBox
Grid.Row="1"
ui:InputAssist.Prefix="间距:"
ui:InputAssist.Suffix="mm" />
<TextBox ui:InputAssist.Prefix="间距:" ui:InputAssist.Suffix="mm" />
<Button
Command="{Binding ArrangeCommand}"
Content="整理"
Cursor="Hand"
Grid.Row="2"
HorizontalAlignment="Stretch" />
</ui:StackPanel>
</ui:NeoWindow>

View File

@@ -8,10 +8,10 @@ namespace ShrlAlgoToolkit.RevitAddins.RvView;
public partial class AlignTagsViewModel : ObservableObject
{
[ObservableProperty]
private bool isAutomatic;
[ObservableProperty]
public partial bool IsAutomatic { get; set; }
private List<List<IndependentTag>> groups = new();
private List<List<IndependentTag>> groups = new();
private readonly ActionEventHandler alignTagsHandler = new();
@@ -36,7 +36,7 @@ public partial class AlignTagsViewModel : ObservableObject
.ToList();
groups = GroupTags(independentTags);
document.InvokeGroup(
tg =>
_ =>
{
foreach (var tags in groups)
{

View File

@@ -1,31 +1,31 @@
<Page
Background="{DynamicResource WindowBackground}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.RvView.ElementsControlDock"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Background="{DynamicResource WindowBackground}"
mc:Ignorable="d">
<Page.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Page.Resources>
<Grid>
<ui:StackPanel
HorizontalAlignment="Center"
Margin="5"
HorizontalAlignment="Center"
Spacing="5">
<Button
x:Name="HideElements"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=VisibilityOff}"
Click="Btn_Click"
Content="隐藏元素"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Hide}"
x:Name="HideElements" />
Content="隐藏元素" />
<Button
x:Name="HideElementsAll"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=HideSource}"
Click="Btn_Click"
Content="隐藏所有"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Hide}"
ToolTip="在所有视图中隐藏该元素"
x:Name="HideElementsAll" />
ToolTip="在所有视图中隐藏该元素" />
<!--<Button
x:Name="HideCategories"
Height="30"
@@ -34,45 +34,45 @@
FontFamily="{StaticResource BoxIcons}"
FontSize="18" />-->
<Button
x:Name="HideCategories"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Category}"
Click="Btn_Click"
Content="隐藏类别"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Hide}"
x:Name="HideCategories" />
Content="隐藏类别" />
<Button
Click="Btn_Click"
Content="锁定元素"
x:Name="PinElements"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Lock}"
x:Name="PinElements" />
<Button
Click="Btn_Click"
Content="锁定类别"
Content="锁定元素" />
<Button
x:Name="PinCategories"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Lock}"
x:Name="PinCategories" />
<Button
Click="Btn_Click"
Content="锁类别"
Content="锁类别" />
<Button
x:Name="UnpinCategories"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=LockOpen}"
x:Name="UnpinCategories" />
<Button
Click="Btn_Click"
Content="解锁全部"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Lock}"
x:Name="UnpinAllElements" />
Content="解锁类别" />
<Button
x:Name="UnpinAllElements"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=LockOpenRight}"
Click="Btn_Click"
Content="隔离元素"
Content="解锁全部" />
<Button
x:Name="IsolateElements"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Search}"
x:Name="IsolateElements" />
<Button
Click="Btn_Click"
Content="隔离类别"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Search}"
x:Name="IsolateCategories" />
Content="隔离元素" />
<Button
x:Name="IsolateCategories"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=CategorySearch}"
Click="Btn_Click"
Content="显示隐藏"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Looks}"
x:Name="RevealHiddenElements" />
Content="隔离类别" />
<Button
x:Name="RevealHiddenElements"
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Visibility}"
Click="Btn_Click"
Content="显示隐藏" />
</ui:StackPanel>
</Grid>
</Page>

View File

@@ -43,7 +43,7 @@ public partial class ElementsControlDock : IDockablePaneProvider
var selectedIds = uidoc.Selection.GetElementIds();
var view = uidoc.ActiveView;
doc.Invoke(
ts =>
_ =>
{
//隐藏元素
if (HideElements == btn)

View File

@@ -14,7 +14,8 @@ namespace ShrlAlgoToolkit.RevitAddins.RvView
private readonly ActionEventHandler handler = new();
[ObservableProperty]
private bool isParallel = true;
public partial bool IsParallel { get; set; } = true;
private readonly List<ViewSection> viewSections = [];
[RelayCommand]
@@ -26,7 +27,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvView
var uidoc = uiapp.ActiveUIDocument;
var doc = uidoc.Document;
doc.Invoke(
ts =>
_ =>
{
for (var i = viewSections.Count - 1; i >= 0; i--)
{

View File

@@ -47,11 +47,14 @@ public partial class SectionBoxControllerViewModel : ObservableObject
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvView.SectionBoxControllerViewModel.RecordSectionBoxCommand), nameof(RevitAddins.RvView.SectionBoxControllerViewModel.UpdateSectionBoxCommand))]
private bool canModify;
public partial bool CanModify { get; set; }
[ObservableProperty]
private SectionBoxType sectionBoxType;
public partial SectionBoxType SectionBoxType { get; set; }
[ObservableProperty]
private bool needExtend;
public partial bool NeedExtend { get; set; }
/// <summary>
/// 记录剖面框修改
/// </summary>

View File

@@ -13,10 +13,10 @@ public partial class SystemDisplayViewModel : ObservableRecipient, IRecipient<Co
{
private SystemModel currentModel;
[ObservableProperty]
private List<SystemModel> systemsCollection;
[ObservableProperty]
public partial List<SystemModel> SystemsCollection { get; set; }
public SystemDisplayViewModel(UIApplication uiapp)
public SystemDisplayViewModel(UIApplication uiapp)
{
var doc = uiapp.ActiveUIDocument.Document;
var enumerable = doc.OfClass<MEPSystemType>().Cast<MEPSystemType>();

View File

@@ -6,35 +6,35 @@ namespace ShrlAlgoToolkit.RevitAddins.RvView;
public partial class ViewManagerModel : ObservableObject
{
[ObservableProperty]
private UserViewDetailLevel? detailLevel;
[ObservableProperty]
public partial UserViewDetailLevel? DetailLevel { get; set; }
[ObservableProperty]
[ObservableProperty]
private UserViewDiscipline? discipline;
[ObservableProperty]
private UserDisplayStyle displayStyle;
[ObservableProperty]
public partial UserDisplayStyle DisplayStyle { get; set; }
[ObservableProperty]
[ObservableProperty]
private string name;
[ObservableProperty]
private int scale;
[ObservableProperty]
public partial int Scale { get; set; }
[ObservableProperty]
[ObservableProperty]
private string sheetName;
[ObservableProperty]
private string sheetNumber;
[ObservableProperty]
public partial string SheetNumber { get; set; }
[ObservableProperty]
[ObservableProperty]
private UserViewType userViewType;
public View View { get; set; }
[ObservableProperty]
private View viewTemplate;
public List<View> ViewTemplates { get; private set; }
[ObservableProperty]
public partial View ViewTemplate { get; set; }
public List<View> ViewTemplates { get; private set; }
public ViewManagerModel(View view)
{

View File

@@ -16,28 +16,28 @@ public partial class ViewManagerViewModel : ObservableObject
{
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvView.ViewManagerViewModel.CopyAsDependentCommand))]
private bool canCopyAsDependent;
public partial bool CanCopyAsDependent { get; set; }
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvView.ViewManagerViewModel.CopyOnlyCommand))]
private bool canCopyOnly;
public partial bool CanCopyOnly { get; set; }
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvView.ViewManagerViewModel.CopyWithDetailCommand))]
private bool canCopyWidthDetail;
public partial bool CanCopyWidthDetail { get; set; }
[ObservableProperty]
ICollectionView filteredList;
public partial ICollectionView FilteredList { get; set; }
private readonly ActionEventHandler handler;
[ObservableProperty]
string searchText;
public partial string SearchText { get; set; }
private List<ViewManagerModel> selectedItems;
[ObservableProperty]
private List<View> viewTemplates;
public partial List<View> ViewTemplates { get; set; }
public ViewManagerViewModel(UIApplication uiapp)
{
@@ -272,7 +272,7 @@ public partial class ViewManagerViewModel : ObservableObject
{
var doc = uiapp.ActiveUIDocument.Document;
doc.Invoke(
__ =>
_ =>
{
foreach (var model in list)
{
@@ -323,7 +323,7 @@ public partial class ViewManagerViewModel : ObservableObject
{
return;
}
handler.Raise(uiapp =>
handler.Raise(_ =>
{
var list = items.Cast<ViewManagerModel>().ToList();
foreach (var model in list)

View File

@@ -13,28 +13,28 @@ public partial class VisibilityViewModel : ObservableObject
public ActionEventHandler VisibilityHandler { get; } = new();
[ObservableProperty]
private bool wallChecked;
public partial bool WallChecked { get; set; }
[ObservableProperty]
private bool floorChecked;
public partial bool FloorChecked { get; set; }
[ObservableProperty]
private bool beamChecked;
public partial bool BeamChecked { get; set; }
[ObservableProperty]
private bool mechanicalChecked;
public partial bool MechanicalChecked { get; set; }
[ObservableProperty]
private bool columnChecked;
public partial bool ColumnChecked { get; set; }
[ObservableProperty]
private bool plumbingChecked;
public partial bool PlumbingChecked { get; set; }
[ObservableProperty]
private bool cableTrayChecked;
public partial bool CableTrayChecked { get; set; }
[ObservableProperty]
private bool conduitChecked;
public partial bool ConduitChecked { get; set; }
partial void OnBeamCheckedChanged(bool value)
{