comparison ServerMonitor/Objects/CheckResult.cs @ 4:3142e52cbe69

Lots more progress
author Brad Greco <brad@bgreco.net>
date Sun, 10 Feb 2019 20:51:26 -0500
parents 96f0b028176d
children 052aa62cb42a
comparison
equal deleted inserted replaced
3:96f0b028176d 4:3142e52cbe69
15 public string Message { get; set; } 15 public string Message { get; set; }
16 16
17 public DateTime StartTime { get; set; } 17 public DateTime StartTime { get; set; }
18 18
19 public DateTime EndTime { get; set; } 19 public DateTime EndTime { get; set; }
20
21 public bool Failed => CheckStatus != CheckStatus.Success;
22
23 public FailAction FailAction
24 {
25 get
26 {
27 switch (CheckStatus)
28 {
29 case CheckStatus.Error: return Settings.Default.ErrorAction;
30 case CheckStatus.Warning: return Settings.Default.WarningAction;
31 case CheckStatus.Information: return Settings.Default.InformationAction;
32 default: return FailAction.None;
33 }
34 }
35 }
36
37 public bool FlashTaskbar => FailAction == FailAction.FlashTaskbar;
20 38
21 public CheckResult(Check check, CheckStatus status, string message) 39 public CheckResult(Check check, CheckStatus status, string message)
22 { 40 {
23 Check = check; 41 Check = check;
24 CheckStatus = status; 42 CheckStatus = status;