命名优化,达芬奇字体修改工具
This commit is contained in:
@@ -29,43 +29,44 @@ public partial class RenameFamilyViewModel : ObservableObject
|
||||
private readonly Document doc;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool canInput;
|
||||
public partial bool CanInput { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private bool isRunning;
|
||||
public partial bool IsRunning { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private bool isUsed;
|
||||
public partial bool IsUsed { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private Dictionary<string, List<Family>> collection;
|
||||
public partial Dictionary<string, List<Family>> Collection { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private int categoryCount;
|
||||
public partial int CategoryCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 列表中元素
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvFamily.RenameFamilyViewModel.ModifyNameCommand))]
|
||||
private List<RenameFamilyItem> renameItems;
|
||||
public partial List<RenameFamilyItem> RenameItems { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private string foundText;
|
||||
public partial string FoundText { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private string prefixText;
|
||||
public partial string PrefixText { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private string replaceText;
|
||||
public partial string ReplaceText { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private string searchText;
|
||||
public partial string SearchText { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private string separator = "-";
|
||||
public partial string Separator { get; set; } = "-";
|
||||
|
||||
[ObservableProperty]
|
||||
private string suffixText;
|
||||
public partial string SuffixText { get; set; }
|
||||
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
public bool CanModify => RenameItems?.Any(item => item.IsSelected) == true;
|
||||
@@ -231,7 +232,7 @@ public partial class RenameFamilyViewModel : ObservableObject
|
||||
//IsAllItemsSelected = true;
|
||||
foreach (var renameItem in RenameItems)
|
||||
{
|
||||
renameItem.PropertyChanged += (sender, args) =>
|
||||
renameItem.PropertyChanged += (_, args) =>
|
||||
{
|
||||
//选中属性修改时,触发
|
||||
if (args.PropertyName == nameof(RevitAddins.RvFamily.RenameFamilyItem.IsSelected))
|
||||
|
||||
Reference in New Issue
Block a user