命名优化,达芬奇字体修改工具
This commit is contained in:
@@ -14,20 +14,24 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.AddInsulationViewModel.AddInsulationCommand))]
|
||||
private bool addToDuct;
|
||||
public partial bool AddToDuct { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.AddInsulationViewModel.AddInsulationCommand))]
|
||||
private bool addToPipe;
|
||||
public partial bool AddToPipe { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 定义的风管保温层
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private InsulationItem ductInsulationItem;
|
||||
public partial InsulationItem DuctInsulationItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 定义的管道保温层
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private List<InsulationItem> pipeInsulationItems;
|
||||
public partial List<InsulationItem> PipeInsulationItems { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 选中的风管系统类型
|
||||
/// </summary>
|
||||
@@ -65,7 +69,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
var uidoc = uiapp.ActiveUIDocument;
|
||||
var doc = uidoc.Document;
|
||||
doc.Invoke(
|
||||
ts =>
|
||||
_ =>
|
||||
{
|
||||
if (AddToDuct)
|
||||
{
|
||||
|
||||
@@ -24,25 +24,25 @@ public partial class AnyConnectViewModel : ObservableValidator
|
||||
private readonly ActionEventHandler anyConnectHandler = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private bool activeSnackbar;
|
||||
public partial bool ActiveSnackbar { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private bool isMultiSelect = true;
|
||||
public partial bool IsMultiSelect { get; set; } = true;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.AnyConnectViewModel.ConnectCommand))]
|
||||
private bool canRunning = true;
|
||||
public partial bool CanRunning { get; set; } = true;
|
||||
|
||||
[ObservableProperty]
|
||||
[Range(0, 90)]
|
||||
[NotifyDataErrorInfo]
|
||||
private double angle = 90;
|
||||
public partial double Angle { get; set; } = 90;
|
||||
|
||||
[ObservableProperty]
|
||||
private NeoUI.Controls.Alert messageQueue = new();
|
||||
public partial NeoUI.Controls.Alert MessageQueue { get; set; } = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private string message;
|
||||
public partial string Message { get; set; }
|
||||
|
||||
[RelayCommand]
|
||||
private static void Closing()
|
||||
|
||||
@@ -16,13 +16,14 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
private readonly ActionEventHandler arrangeHandler = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private double gap = 250;
|
||||
public partial double Gap { get; set; } = 250;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool mEPCurveCenter = true;
|
||||
public partial bool MEPCurveCenter { get; set; } = true;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool isHorizon = true;
|
||||
public partial bool IsHorizon { get; set; } = true;
|
||||
|
||||
[RelayCommand]
|
||||
private void Arrange()
|
||||
{
|
||||
@@ -32,7 +33,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
var uidoc = uiapp.ActiveUIDocument;
|
||||
var doc = uidoc.Document;
|
||||
doc.Invoke(
|
||||
ts =>
|
||||
_ =>
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -13,15 +13,15 @@ public partial class CableLayoutViewModel : ObservableValidator
|
||||
public CableLayoutViewModel(Document doc)
|
||||
{
|
||||
this.doc = doc;
|
||||
specifications = new FilteredElementCollector(doc).OfClass(typeof(ConduitType)).Cast<ConduitType>().ToList();
|
||||
Specifications = new FilteredElementCollector(doc).OfClass(typeof(ConduitType)).Cast<ConduitType>().ToList();
|
||||
}
|
||||
[ObservableProperty]
|
||||
private ConduitType selectedConduitType;
|
||||
public partial ConduitType SelectedConduitType { get; set; }
|
||||
|
||||
[Range(1, 20, ErrorMessage = "输入值有误!")]
|
||||
[ObservableProperty]
|
||||
[NotifyDataErrorInfo]
|
||||
private int count;
|
||||
public partial int Count { get; set; }
|
||||
|
||||
//public int Count
|
||||
//{
|
||||
@@ -30,11 +30,13 @@ public partial class CableLayoutViewModel : ObservableValidator
|
||||
//}
|
||||
|
||||
[ObservableProperty]
|
||||
private List<ConduitType> specifications;
|
||||
public partial List<ConduitType> Specifications { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private ConduitSize size;
|
||||
public partial ConduitSize Size { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private Dictionary<string, ConduitSize> sizes;
|
||||
public partial Dictionary<string, ConduitSize> Sizes { get; set; }
|
||||
|
||||
[RelayCommand]
|
||||
private void CloseWin(object obj)
|
||||
|
||||
@@ -18,17 +18,18 @@ public partial class ClashReportViewModel(UIApplication uiapp) : ObservableObjec
|
||||
{
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.ClashReportViewModel.RefreshCommand))]
|
||||
private string filePathName;
|
||||
public partial string FilePathName { get; set; }
|
||||
public UIApplication UiApp { get; set; } = uiapp;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool inCurrentView = true;
|
||||
[ObservableProperty]
|
||||
private bool isSetSectionBox;
|
||||
public partial bool InCurrentView { get; set; } = true;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool IsSetSectionBox { get; set; }
|
||||
public DataTable DataSource { get; set; } = new DataTable();
|
||||
[ObservableProperty]
|
||||
private DataTable currentViewItems = new();
|
||||
public partial DataTable CurrentViewItems { get; set; } = new();
|
||||
|
||||
[RelayCommand]
|
||||
private void LvScroll(ScrollViewer scrollViewer)
|
||||
{
|
||||
|
||||
@@ -18,27 +18,26 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP;
|
||||
public partial class ClashResolveViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private AdjustDirection adjustDirection;
|
||||
public partial AdjustDirection AdjustDirection { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private AdjustType adjustType = AdjustType.OneSide;
|
||||
public partial AdjustType AdjustType { get; set; } = AdjustType.OneSide;
|
||||
|
||||
/// <summary>
|
||||
/// 正在执行命令
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.ClashResolveViewModel.ResolveCommand))]
|
||||
private bool canRunning = true;
|
||||
public partial bool CanRunning { get; set; } = true;
|
||||
|
||||
[ObservableProperty]
|
||||
private double angle = 90.0;
|
||||
public partial double Angle { get; set; } = 90.0;
|
||||
|
||||
[ObservableProperty]
|
||||
private double offset = 800;
|
||||
public partial double Offset { get; set; } = 800;
|
||||
|
||||
[ObservableProperty]
|
||||
private LocationType locationType = LocationType.Manual;
|
||||
|
||||
public partial LocationType LocationType { get; set; } = LocationType.Manual;
|
||||
public ActionEventHandler ActionEventHandler { get; } = new();
|
||||
partial void OnLocationTypeChanged(LocationType value)
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ public class CorrectMEPCurveSlopeCmd : ExternalCommand
|
||||
private void CorrectSlope()
|
||||
{
|
||||
var ids = UiDocument.Selection.GetElementIds();
|
||||
Document.Invoke(ts =>
|
||||
Document.Invoke(_ =>
|
||||
{
|
||||
foreach (var id in ids)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
familyInstances = UiDocument.SelectObjects<FamilyInstance>("请选择族实例");
|
||||
}
|
||||
Document.Invoke(
|
||||
ts =>
|
||||
_ =>
|
||||
{
|
||||
foreach (var ins in familyInstances)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ public partial class HeadroomCheckViewModel : ObservableObject
|
||||
private readonly Document document;
|
||||
|
||||
[ObservableProperty]
|
||||
private List<RoomCheckItem> rooms;
|
||||
public partial List<RoomCheckItem> Rooms { get; set; }
|
||||
|
||||
private List<RoomCheckItem> GetRoomItems()
|
||||
{
|
||||
var roomItems = new List<RoomCheckItem>();
|
||||
|
||||
@@ -36,7 +36,8 @@ public partial class InsulationItem : ObservableValidator
|
||||
[Range(10, 1000)]
|
||||
[NotifyDataErrorInfo]
|
||||
[ObservableProperty]
|
||||
private double thickness;
|
||||
public partial double Thickness { get; set; }
|
||||
|
||||
//{
|
||||
// get => thickness;
|
||||
// set => SetProperty(ref thickness, value, true);
|
||||
@@ -44,7 +45,8 @@ public partial class InsulationItem : ObservableValidator
|
||||
//private double thickness;
|
||||
|
||||
[ObservableProperty]
|
||||
private PipeInsulationType pipeInsulationType;
|
||||
public partial PipeInsulationType PipeInsulationType { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private DuctInsulationType ductInsulationType;
|
||||
public partial DuctInsulationType DuctInsulationType { get; set; }
|
||||
}
|
||||
|
||||
@@ -12,16 +12,17 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP;
|
||||
public partial class MoveMEPCurveViewModel : ObservableValidator
|
||||
{
|
||||
[ObservableProperty]
|
||||
private bool isSingle = true;
|
||||
public partial bool IsSingle { get; set; } = true;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool byDistance = true;
|
||||
public partial bool ByDistance { get; set; } = true;
|
||||
|
||||
private readonly ActionEventHandler moveHandler = new();
|
||||
|
||||
[IsNumeric]
|
||||
[ObservableProperty]
|
||||
[NotifyDataErrorInfo]
|
||||
private double distance;
|
||||
public partial double Distance { get; set; }
|
||||
|
||||
//public double Distance
|
||||
//{
|
||||
@@ -34,7 +35,7 @@ public partial class MoveMEPCurveViewModel : ObservableValidator
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.MoveMEPCurveViewModel.MoveCommand))]
|
||||
private bool canRunning = true;
|
||||
public partial bool CanRunning { get; set; } = true;
|
||||
|
||||
[RelayCommand]
|
||||
private void Closing()
|
||||
|
||||
@@ -7,12 +7,15 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
public partial class RoomCheckItem : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private bool isSelected;
|
||||
public partial bool IsSelected { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private string name;
|
||||
public partial string Name { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private Room room;
|
||||
public partial Room Room { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private Color color;
|
||||
public partial Color Color { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,11 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
public partial class RotateMEPViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private double angle = 90;
|
||||
public partial double Angle { get; set; } = 90;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool isSingleSelect = true;
|
||||
public partial bool IsSingleSelect { get; set; } = true;
|
||||
|
||||
[RelayCommand]
|
||||
private void RotateInstance()
|
||||
{
|
||||
@@ -83,7 +85,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
if (referConn != null)
|
||||
{
|
||||
doc.Invoke(
|
||||
ts =>
|
||||
_ =>
|
||||
{
|
||||
ElementTransformUtils.RotateElement(
|
||||
doc,
|
||||
|
||||
@@ -26,64 +26,64 @@ public partial class StandMepCurveViewModel : ObservableObject
|
||||
private readonly ActionEventHandler standMepCurveEventHandler = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private IEnumerable<CableTrayType> cableTrayTypes;
|
||||
public partial IEnumerable<CableTrayType> CableTrayTypes { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private IEnumerable<ConduitType> conduitTypes;
|
||||
public partial IEnumerable<ConduitType> ConduitTypes { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private IEnumerable<MechanicalSystemType> ductSystemTypes;
|
||||
|
||||
public partial IEnumerable<MechanicalSystemType> DuctSystemTypes { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private IEnumerable<DuctType> ductTypes;
|
||||
public partial IEnumerable<DuctType> DuctTypes { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private bool? isCableTray;
|
||||
public partial bool? IsCableTray { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private bool? isConduit;
|
||||
public partial bool? IsConduit { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private bool? isDuct;
|
||||
public partial bool? IsDuct { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private bool? isPipe = true;
|
||||
public partial bool? IsPipe { get; set; } = true;
|
||||
|
||||
[ObservableProperty]
|
||||
private IEnumerable<PipingSystemType> pipeSystemTypes;
|
||||
public partial IEnumerable<PipingSystemType> PipeSystemTypes { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private IEnumerable<PipeType> pipeTypes;
|
||||
public partial IEnumerable<PipeType> PipeTypes { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private CableTrayType selectedCableTrayType;
|
||||
public partial CableTrayType SelectedCableTrayType { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private ConduitType selectedConduitType;
|
||||
public partial ConduitType SelectedConduitType { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private MechanicalSystemType selectedDuctSystemType;
|
||||
public partial MechanicalSystemType SelectedDuctSystemType { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private DuctType selectedDuctType;
|
||||
public partial DuctType SelectedDuctType { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private PipingSystemType selectedPipeSystemType;
|
||||
public partial PipingSystemType SelectedPipeSystemType { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvMEP.StandMepCurveViewModel.CreateMepCurveCommand))]
|
||||
private PipeType selectedPipeType;
|
||||
public partial PipeType SelectedPipeType { get; set; }
|
||||
|
||||
partial void OnSelectedPipeTypeChanged(PipeType value)
|
||||
{
|
||||
var rule = value.RoutingPreferenceManager.GetRule(RoutingPreferenceRuleGroupType.Segments, 0);
|
||||
@@ -92,7 +92,7 @@ public partial class StandMepCurveViewModel : ObservableObject
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private ICollection<MEPSize> pipeSizes;
|
||||
public partial ICollection<MEPSize> PipeSizes { get; set; }
|
||||
|
||||
private bool isRunning;
|
||||
|
||||
|
||||
@@ -18,27 +18,29 @@ namespace ShrlAlgoToolkit.RevitAddins.RvMEP
|
||||
Abbreviation = systemType.Abbreviation;
|
||||
}
|
||||
[ObservableProperty]
|
||||
private System.Windows.Media.Brush backgroundColor;
|
||||
public partial System.Windows.Media.Brush BackgroundColor { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private Color fillColor;
|
||||
public partial Color FillColor { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private MEPSystemClassification mEPSystemClassification;
|
||||
public partial MEPSystemClassification MEPSystemClassification { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private string name;
|
||||
public partial string Name { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private PipeSystemType pipeSystemType;
|
||||
public partial PipeSystemType PipeSystemType { get; set; }
|
||||
|
||||
//系统类型
|
||||
[ObservableProperty]
|
||||
private MEPSystemType systemType;
|
||||
public partial MEPSystemType SystemType { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private Color lineColor;
|
||||
[ObservableProperty]
|
||||
private string abbreviation;
|
||||
public partial Color LineColor { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string Abbreviation { get; set; }
|
||||
}
|
||||
|
||||
public enum MEPSystemClassification
|
||||
|
||||
Reference in New Issue
Block a user