Exemple #1
0
        void SaveToDeviceAccordinglyClassType()
        {
            if (Myobj == null)
            {
                return;
            }
            if (CsConst.MyTmpSensors == null || CsConst.MyTmpSensors.Count == 0)
            {
                return;
            }

            if (Myobj is DLP)
            {
                DLP TmpDLP = (DLP)Myobj;
                #region
                int i = 0;
                foreach (DeviceInfo oTmp in CsConst.MyTmpSensors)
                {
                    TmpDLP.DLPAC.TempSensors[i * 4 + 0] = 1;
                    TmpDLP.DLPAC.TempSensors[i * 4 + 1] = oTmp.SubnetID;
                    TmpDLP.DLPAC.TempSensors[i * 4 + 2] = oTmp.DeviceID;
                    TmpDLP.DLPAC.TempSensors[i * 4 + 3] = oTmp.Other;
                    i++;
                }
                String TmpDevName = TmpDLP.DeviceName.Split('\\')[0].Trim();

                byte SubNetID = byte.Parse(TmpDevName.Split('-')[0].ToString());
                byte DeviceID = byte.Parse(TmpDevName.Split('-')[1].ToString());

                TmpDLP.DLPAC.SaveTemperatureSensor(SubNetID, DeviceID, 172);
                #endregion
            }
        }
Exemple #2
0
        public FrmSlave(string strname, DLP panel, int devicetype)
        {
            InitializeComponent();
            this.strName    = strname;
            this.oDLP       = panel;
            this.DeviceType = devicetype;
            string strDevName = strName.Split('\\')[0].ToString();

            SubNetID = Convert.ToByte(strDevName.Split('-')[0]);
            DeviceID = Convert.ToByte(strDevName.Split('-')[1]);
        }
Exemple #3
0
        public FrmCombinationWays(string strname, int devicetype, int selectedPageid, DLP panel)
        {
            InitializeComponent();
            string strDevName = strname.Split('\\')[0].ToString();

            strRemark            = strname.Split('\\')[1].ToString();
            SubnetID             = Convert.ToByte(strDevName.Split('-')[0]);
            DeviceID             = Convert.ToByte(strDevName.Split('-')[1]);
            this.MyintDeviceType = devicetype;
            this.PageID          = selectedPageid;
            this.oPanel          = panel;
        }
Exemple #4
0
        public FrmACSetup(string strname, Object colordlp, int devicetype)
        {
            InitializeComponent();
            this.DeviceName = strname;
            this.oDLP       = (DLP)colordlp;
            this.DeviceType = devicetype;

            string strDevName = strname.Split('\\')[0].ToString();

            SubNetID = Convert.ToByte(strDevName.Split('-')[0]);
            DeviceID = Convert.ToByte(strDevName.Split('-')[1]);
        }