Пример #1
0
 public void On_TaskJob_Finished(TaskJobManagment.CurrentProceedTask Task)
 {
     if (Task.Id.Equals("FormManual"))
     {
         ManualPortStatusUpdate.LockUI(false);
     }
 }
Пример #2
0
        public void On_TaskJob_Aborted(TaskJobManagment.CurrentProceedTask Task, string NodeName, string ReportType, string Message)
        {
            if (Task.Id.Equals("FormManual"))
            {
                ManualPortStatusUpdate.LockUI(false);
            }
            AlarmInfo CurrentAlarm = new AlarmInfo();

            CurrentAlarm.NodeName  = "SYSTEM";
            CurrentAlarm.AlarmCode = Message;
            CurrentAlarm.NeedReset = false;
            try
            {
                AlarmMessage Detail = AlmMapping.Get("SYSTEM", CurrentAlarm.AlarmCode);
                if (!Detail.Code_Group.Equals("UNDEFINITION"))
                {
                    CurrentAlarm.SystemAlarmCode = Detail.CodeID;
                    CurrentAlarm.Desc            = Detail.Code_Cause;
                    CurrentAlarm.EngDesc         = Detail.Code_Cause_English;
                    CurrentAlarm.Type            = Detail.Code_Type;
                    CurrentAlarm.IsStop          = Detail.IsStop;
                    if (CurrentAlarm.IsStop)
                    {
                        //RouteCtrl.Stop();
                    }
                    CurrentAlarm.TimeStamp = DateTime.Now;

                    AlarmManagement.Add(CurrentAlarm);

                    AlarmUpdate.UpdateAlarmList(AlarmManagement.GetAll());
                    AlarmUpdate.UpdateAlarmHistory(AlarmManagement.GetHistory());
                }
            }
            catch (Exception e)
            {
                CurrentAlarm.Desc = "未定義";
                logger.Error("(GetAlarmMessage)" + e.Message + "\n" + e.StackTrace);
            }
        }