Example #1
0
        public FrmCoolMaster(CoolMaster mycoolmaster, string strName, int intDIndex, int intDeviceType)
        {
            InitializeComponent();
            this.MyCoolMaster    = mycoolmaster;
            this.myDevName       = strName;
            this.mintIDIndex     = intDIndex;
            this.mywdDevicerType = intDeviceType;
            string strDevName = strName.Split('\\')[0].ToString();

            HDLSysPF.DisplayDeviceNameModeDescription(strName, mywdDevicerType, cboDevice, tbModel, tbDescription);

            SubNetID  = Convert.ToByte(strDevName.Split('-')[0]);
            DevID     = Convert.ToByte(strDevName.Split('-')[1]);
            this.Text = strName;
            tsl3.Text = strName;
        }
Example #2
0
        void SetCtrlsVisbleWithDifferentDeviceType()
        {
            if (MyCoolMaster == null)
            {
                return;
            }

            if (CoolMasterDeviceTypeList.CLModuleNormal232.Contains(mywdDevicerType)) // 232 version
            {
                tab.TabPages.Remove(tabNet);
            }
            else if (CoolMasterDeviceTypeList.CLModuleWithNet.Contains(mywdDevicerType)) // net version
            {
                MyCoolMaster = (CoolMasterNet)MyCoolMaster;
                tab.TabPages.Remove(tabLists);
                panel2.Controls.Clear();
                networkinfo = new NetworkInForm(SubNetID, DevID, mywdDevicerType);
                panel2.Controls.Add(networkinfo);
                networkinfo.Dock = DockStyle.Fill;
            }
            toolStrip1.Visible = (CsConst.MyEditMode == 0);
        }