Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 5
0
 /// <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;
 }