using System; using Aitex.Core.RT.Event; namespace Aitex.Core.UI.View.Common { /// /// 应用于UI端显示的报警信息对象。 /// public class AlarmItem { #region Properties /// /// 设置或返回报警发生的时间。 /// public string OccuringTime { get; set; } /// /// 设置或返回报警描述。 /// public string Description { get; set; } /// /// 返回报警类型文本。 /// /// 可用的报警类型请参考枚举。 /// /// public string LevelString => Level == EventLevel.Alarm ? "Alarm" : (Level == EventLevel.Information ? "Info" : "Warning"); /// /// 设置或返回报警等级。 /// public EventLevel Level { get; set; } /// /// 设置或返回报警编号。 /// public int EventId { get; set; } /// /// 设置或返回报警名称。 /// public string EventEnum { get; set; } /// /// 设置或返回报警的详细解释。 /// public string Explaination { get; set; } /// /// 设置或返回报警的处理方法描述。 /// public string Solution { get; set; } /// /// 设置或返回报警来源。 /// public string Source { get; set; } /// /// 设置或返回当前报警是否已被应答。 /// public bool IsAcknowledged { get; set; } /// /// 设置或返回当前报警被应答的时间。 /// public DateTime AcknowledgeTime { get; set; } #endregion #region Methods /// /// 判断当前报警信息是否和指定的报警信息相同。 /// /// /// public bool IsEqualTo(AlarmItem item) { return item.OccuringTime == OccuringTime && item.Description == Description && item.Level == Level; } #endregion } }