示例#1
0
文件: CMS.cs 项目: ufjl0683/Center
 public CMS(AEvent aDevice, CategoryType type, System.Collections.Hashtable ht, DeviceType devType, System.Collections.Hashtable DevRange, Degree degree)
 {
     Initialize(aDevice, type, ht, devType, DevRange, degree);
     this.GetMessRuleData += new GetMessRuleDataHandler(CMS_GetMessRuleData);
     List<object> messColors = (List<object>)com.select(DBConnect.DataType.MessColor, Command.GetSelectCmd.getMessColor());
     messColorsHT = new System.Collections.Hashtable();
     foreach (object obj in messColors)
     {
         MessColor mess = (MessColor)obj;
         messColorsHT.Add(mess.ID, mess);
     }
 }
示例#2
0
文件: CCTV.cs 项目: ufjl0683/Center
 public CCTV(AEvent aDevice, CategoryType type, System.Collections.Hashtable ht, DeviceType devType, System.Collections.Hashtable DevRange, Degree degree)
 {
     Initialize(aDevice, type, ht, devType, DevRange, degree);
 }
示例#3
0
文件: LCS.cs 项目: ufjl0683/Center
        int n_device = 3; //���ƥ��I�̻�N��LCS����V�T��

        #endregion Fields

        #region Constructors

        public LCS(AEvent aDevice, CategoryType type, System.Collections.Hashtable ht, DeviceType devType, System.Collections.Hashtable DevRange, Degree degree)
        {
            Initialize(aDevice, type, ht, devType, DevRange, degree);
            this.GetMessRuleData += new GetMessRuleDataHandler(LCS_GetMessRuleData);
        }
示例#4
0
        protected void Initialize(AEvent aDevice, CategoryType type, System.Collections.Hashtable ht, DeviceType devType, System.Collections.Hashtable DevRange,Degree degree)
        {
            this.type = type;
            this.secType = Convert.ToByte(ht["INC_NAME"]);
            this.aDevice = aDevice;
            this.ht = ht;
            this.com = new DBConnect.ODBC_DB2Connect();
            this.devType = devType;
            this.DevRange = DevRange;
            this.degree = degree;
            com.GetReaderData += new DBConnect.GetReaderDataHandler(com_GetMessRuleData);

            if (isNear && (int)DevRange["NORMAL"] > 0) //�汵��q��ܽd�� - 1
            {
                DevRange["NORMAL"] = (int)DevRange["NORMAL"] - 1;
            }
        }
示例#5
0
文件: AEvent.cs 项目: ufjl0683/Center
 /// <summary>
 /// �˹��̤u�t�ϥΤ�k
 /// </summary>
 /// <param name="adorns">�˹�����O�_�˹�</param>
 /// <param name="myObj">AEvent</param>
 /// <returns></returns>
 protected AEvent getAdorns(List<DeviceType> adorns, AEvent myObj, List<object> Decorators,Degree degree)
 {
     for (int i = 0; i < adorns.Count;i++ )
     {
         switch (adorns[i])
         {
             case DeviceType.CMS:
                 myObj = new CMS(myObj, type, ht, DeviceType.CMS, (System.Collections.Hashtable)Decorators[i], degree);
                 break;
             case DeviceType.WIS:
                 myObj = new WIS(myObj, type, ht, DeviceType.WIS, (System.Collections.Hashtable)Decorators[i], degree);
                 break;
             case DeviceType.FS:
                 myObj = new FS(myObj, type, ht, DeviceType.FS, (System.Collections.Hashtable)Decorators[i], degree);
                 break;
             case DeviceType.RGS:
                 myObj = new RGS(myObj, type, ht, DeviceType.RGS, (System.Collections.Hashtable)Decorators[i], degree);
                 break;
             case DeviceType.LCS:
                 myObj = new LCS(myObj, type, ht, DeviceType.LCS, (System.Collections.Hashtable)Decorators[i], degree);
                 break;
             case DeviceType.CSLS:
                 myObj = new CSLS(myObj, type, ht, DeviceType.CSLS, (System.Collections.Hashtable)Decorators[i], degree);
                 break;
             case DeviceType.RMS:
                 myObj = new RMS(myObj, type, ht, DeviceType.RMS, (System.Collections.Hashtable)Decorators[i], degree);
                 break;
             default:
                 myObj = new CCTV(myObj, type, ht, DeviceType.CCTV, (System.Collections.Hashtable)Decorators[i], degree);
                 break;
         }
     }
     return myObj;
 }