Files
ShrlAlgoToolkit/Sai.RvKits/Windows/ProgressMonitorViewModel.cs

37 lines
947 B
C#
Raw Normal View History

2024-09-22 11:05:41 +08:00
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Sai.RvKits.Windows
{
partial class ProgressMonitorViewModel : ObservableObject
{
[ObservableProperty]
public int maxValue = 100;
[ObservableProperty]
private int currentValue = 0;
[ObservableProperty]
private string currentContext = string.Empty;
[ObservableProperty]
private string title = "处理任务";
public void NotifyUI()
{
var classType = this.GetType();
if (classType != null)
{
var currentProperties = classType.GetProperties();
foreach (var currentProperty in currentProperties)
OnPropertyChanged(currentProperty.Name);
}
}
}
}