namespace BPA.SingleDevice.ViewModel
{
    public class AlarmLogViewModel : NotifyBase
    {
        public AlarmLogViewModel()
        {
            AlarmLogs = new();
            //for (int i = 1; i <= 100; i++)
            //{
            //    AlarmLogs.Add(new()
            //    {
            //        ID = i,
            //        Date = DateTime.Now.Date.ToString("yyyy-MM-dd"),
            //        Time = DateTime.Now.ToString("HH:mm:ss"),
            //        Value = "108",
            //        Info = "测试用报警信息",
            //        Grade = "一般报警"
            //    });
            //}

            ViewHistoryCommand = new(() =>
            {
                //MessageBoxR.Show(IsShowHistory.ToString());
                Message.Show(IsShowHistory.ToString());
            });
        }

        public bool IsShowHistory { get; set; }
        public ObservableCollection<AlarmLogTB> AlarmLogs { get; set; }

        /// <summary>查看历史日志。</summary>
        public BPARelayCommand ViewHistoryCommand { get; set; }
    }
}