调整代码

This commit is contained in:
GG Z
2026-02-22 20:03:42 +08:00
parent 2ad3d0fde0
commit 7e2d5be3cd
258 changed files with 2916 additions and 5013 deletions

View File

@@ -0,0 +1,39 @@
using Autodesk.Revit.DB;
using CommunityToolkit.Mvvm.ComponentModel;
namespace ShrlAlgoToolkit.RevitAddins.RvFamily;
public partial class RenameTypeItem : ObservableValidator
{
[ObservableProperty]
public partial bool IsSelected { get; set; }
[ObservableProperty]
[Common.Attributes.UndefinedChar]
[NotifyDataErrorInfo]
public partial string NewTypeName { get; set; }
[ObservableProperty]
public partial string OldTypeName { get; set; }
partial void OnIsSelectedChanged(bool value)
{
if (value == false)
{
NewTypeName = string.Empty;
}
}
public ElementType ElementType { get; set; }
public string CategoryName { get; set; }
public string FamilyName { get; set; }
//public RenameTypeItem()
//{
// PropertyChanged += (sender, args) =>
// {
// if (args.PropertyName == nameof(RenameTypeItem.IsSelected))
// OnPropertyChanged(nameof(RenameTypeViewModel.IsAllItemsSelected));
// };
//}
}