2024-09-22 11:05:41 +08:00
|
|
|
|
using Autodesk.Revit.DB;
|
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
|
|
2025-04-24 20:56:44 +08:00
|
|
|
|
namespace ShrlAlgoToolkit.RevitAddins.RvFamily;
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
public partial class RenameTypeItem : ObservableValidator
|
|
|
|
|
|
{
|
|
|
|
|
|
[ObservableProperty]
|
2025-10-04 08:52:23 +08:00
|
|
|
|
public partial bool IsSelected { get; set; }
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
[ObservableProperty]
|
2026-02-21 16:31:24 +08:00
|
|
|
|
[Common.Attributes.UndefinedChar]
|
2024-09-22 11:05:41 +08:00
|
|
|
|
[NotifyDataErrorInfo]
|
2025-10-04 08:52:23 +08:00
|
|
|
|
public partial string NewTypeName { get; set; }
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
[ObservableProperty]
|
2025-10-04 08:52:23 +08:00
|
|
|
|
public partial string OldTypeName { get; set; }
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
|
// };
|
|
|
|
|
|
//}
|
|
|
|
|
|
}
|