Files
test_demo/MX-PD-盘古 - new/PanGu.DieBonderApp/MainShell/Alarm/ViewModel/AlarmDialogViewModel.cs

41 lines
943 B
C#
Raw Normal View History

using MainShell.Models;
using MaxwellFramework.Core.Common.Command;
using MwFramework.AlarmManager;
using System.Windows.Input;
namespace MainShell.Alarm.ViewModel
{
public class AlarmDialogViewModel : BaseScreen
{
public ICommand ResetCommand { get; }
public ICommand CloseCommand { get; }
public AlarmDialogViewModel()
{
DisplayName = "报警详情";
ResetCommand = new DelegateCommand(obj => Reset());
CloseCommand = new DelegateCommand(obj => Close());
}
private AlarmInfo _alarmInfo;
public AlarmInfo AlarmInfo
{
get => _alarmInfo;
set
{
SetAndNotify(ref _alarmInfo, value);
}
}
private void Close()
{
RequestClose(false);
}
private void Reset()
{
RequestClose(true);
}
}
}