Files
Shrlalgo.RvKits/ShrlAlgoToolkit.RevitAddins/Windows/ProgressMonitorViewModel.cs
2025-10-04 08:52:23 +08:00

31 lines
904 B
C#

using CommunityToolkit.Mvvm.ComponentModel;
namespace ShrlAlgoToolkit.RevitAddins.Windows
{
partial class ProgressMonitorViewModel : ObservableObject
{
[ObservableProperty]
public partial int MaxValue { get; set; } = 100;
[ObservableProperty]
public partial int CurrentValue { get; set; } = 0;
[ObservableProperty]
public partial string CurrentContext { get; set; } = string.Empty;
[ObservableProperty]
public partial string Title { get; set; } = "处理任务";
public void NotifyUI()
{
var classType = this.GetType();
if (classType != null)
{
var currentProperties = classType.GetProperties();
foreach (var currentProperty in currentProperties)
OnPropertyChanged(currentProperty.Name);
}
}
}
}