Beispiel #1
0
 //获取错误单元
 string GetErrorCell(Hashtable hashtable)
 {
     try
     {
         if (hashtable == null)
         {
             return("");
         }
         if (hashtable.Keys == null)
         {
             return("");
         }
         foreach (string key in hashtable.Keys)
         {
             if (hashtable[key] == null)
             {
                 string str = "相机" + g_NoCamera.ToString() + "处理异常:";
                 BaseParComprehensive baseParComprehensive = g_BaseParComprehensive.GetCellClass(key);
                 string annotation = baseParComprehensive.Annotation;
                 g_UCAlarm.AddInfo(str + key + ":" + annotation);
                 g_UCStateWork.AddInfo(str + key + ":" + annotation);
             }
         }
         return("");
     }
     catch (Exception ex)
     {
         Log.L_I.WriteError(NameClass, ex);
         return("");
     }
 }
Beispiel #2
0
        /// <summary>
        /// 将报警信息显示出来,同时显示在状态区域
        /// </summary>
        /// <param name="alarm"></param>
        public static void ShowAlarm(string alarm)
        {
            if (alarm == "")
            {
                return;
            }
            if (!ParStateAndAlarm.P_I.BlAutoShow)
            {
                ParStateAndAlarm.P_I.BlShowMain = true;
            }
            if (ParStateAndAlarm.P_I.BlShowMain)
            {
                g_UCStateWork.AddInfo(alarm);
                g_UCAlarm.AddInfo(alarm);
            }

            if (ParStateAndAlarm.P_I.BlAutoShow)
            {
                if (WinStateAndAlarm.GetWinInst() != null)
                {
                    WinStateAndAlarm.GetWinInst().AddAlarmInfo(alarm);
                }
            }
        }