更新整理
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
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.RvView;
|
||||
namespace ShrlAlgoToolkit.RevitAddins.RvView;
|
||||
|
||||
public partial class SectionBoxControllerViewModel : ObservableObject
|
||||
{
|
||||
@@ -48,7 +43,7 @@ public partial class SectionBoxControllerViewModel : ObservableObject
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RecordSectionBoxCommand), nameof(UpdateSectionBoxCommand))]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvView.SectionBoxControllerViewModel.RecordSectionBoxCommand), nameof(RevitAddins.RvView.SectionBoxControllerViewModel.UpdateSectionBoxCommand))]
|
||||
private bool canModify;
|
||||
[ObservableProperty]
|
||||
private SectionBoxType sectionBoxType;
|
||||
@@ -63,7 +58,7 @@ public partial class SectionBoxControllerViewModel : ObservableObject
|
||||
private readonly UIApplication uiapp;
|
||||
private int index = 1;
|
||||
|
||||
[RelayCommand(CanExecute = nameof(CanModify))]
|
||||
[RelayCommand(CanExecute = nameof(RevitAddins.RvView.SectionBoxControllerViewModel.CanModify))]
|
||||
private void RecordSectionBox()
|
||||
{
|
||||
if (uiapp.ActiveUIDocument.Document.ActiveView is View3D { IsSectionBoxActive: true } view3D)
|
||||
@@ -262,7 +257,7 @@ public partial class SectionBoxControllerViewModel : ObservableObject
|
||||
"重设(剖面)剖面框");
|
||||
}
|
||||
}
|
||||
[RelayCommand(CanExecute = nameof(CanModify))]
|
||||
[RelayCommand(CanExecute = nameof(RevitAddins.RvView.SectionBoxControllerViewModel.CanModify))]
|
||||
private void UpdateSectionBox(object obj)
|
||||
{
|
||||
if (obj is BoundingBoxXYZ boundingBoxXyz)
|
||||
|
||||
Reference in New Issue
Block a user