2025-04-24 20:56:44 +08:00
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
2025-02-10 20:53:40 +08:00
|
|
|
|
|
2025-04-24 20:56:44 +08:00
|
|
|
|
namespace ShrlAlgoToolkit.RevitAddins.Windows
|
2024-09-22 11:05:41 +08:00
|
|
|
|
{
|
|
|
|
|
|
partial class ProgressMonitorViewModel : ObservableObject
|
|
|
|
|
|
{
|
|
|
|
|
|
[ObservableProperty]
|
2025-10-04 08:52:23 +08:00
|
|
|
|
public partial int MaxValue { get; set; } = 100;
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
[ObservableProperty]
|
2025-10-04 08:52:23 +08:00
|
|
|
|
public partial int CurrentValue { get; set; } = 0;
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
[ObservableProperty]
|
2025-10-04 08:52:23 +08:00
|
|
|
|
public partial string CurrentContext { get; set; } = string.Empty;
|
|
|
|
|
|
|
2024-09-22 11:05:41 +08:00
|
|
|
|
[ObservableProperty]
|
2025-10-04 08:52:23 +08:00
|
|
|
|
public partial string Title { get; set; } = "处理任务";
|
2024-09-22 11:05:41 +08:00
|
|
|
|
|
|
|
|
|
|
public void NotifyUI()
|
|
|
|
|
|
{
|
|
|
|
|
|
var classType = this.GetType();
|
|
|
|
|
|
if (classType != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
var currentProperties = classType.GetProperties();
|
|
|
|
|
|
foreach (var currentProperty in currentProperties)
|
|
|
|
|
|
OnPropertyChanged(currentProperty.Name);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|