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); } } }