public void DisplayAlarm() { var alarm = new DisplayAlarm(new TriggerRelative(0, -15, 0), "Hello, world!"); Assert.IsNotNull(alarm); Assert.AreEqual(new TimeSpan(0, -15, 0), ((TriggerRelative)alarm.Trigger).Value); }
/// <summary> /// 处理报警信息。 /// </summary> public void Managed() { TDTK.IndustryPlatform.SafetyMonitor.BLL.TN_Cache.Rtm delectCache = BLL.TN_Cache.Rtm.GetInstance(); BLL.DisplayAlarm ManageA = new DisplayAlarm(); List<Model.TN_AlarmRecodeClearUp> ManagedList = ManageA.ManagedAlarm();//获取已处理报警集合 delectCache.TN_AlarmRecodeClearUpdelectCache(ManagedList);//删除缓存中已处理报警信息并保存到数据库中 delectCache.TN_AlarmRecodeClearUpAnalyseCache();//更新缓存中报警数据(超时的重新报警)。 }
private void InitializaAlarms() { DisplayAlarm = new DisplayAlarm(); WarningBellAlarm = new WarningBellAlarm(); }