Example #1
0
        public FrmACModeSetup(MHRCU myMHRCU, string strName, int intDeviceType)
        {
            InitializeComponent();
            this.myDevName = strName;
            string strDevName = strName.Split('\\')[0].ToString();

            this.MyintDeviceType = intDeviceType;
            this.oMHRCU          = myMHRCU;
            lbRemarkValue.Text   = strName.Split('\\')[1].ToString();
            lbSubValue.Text      = strDevName.Split('-')[0];
            lbDevValue.Text      = strDevName.Split('-')[1];
            SubNetID             = Convert.ToByte(strDevName.Split('-')[0]);
            DevID             = Convert.ToByte(strDevName.Split('-')[1]);
            cb1               = new ComboBox();
            cb1.DropDownStyle = ComboBoxStyle.DropDownList;
            cb1.Items.Clear();
            cb1.Items.Add(CsConst.mstrINIDefault.IniReadValue("Public", "99655", ""));
            cb1.Items.Add(CsConst.mstrINIDefault.IniReadValue("Public", "99656", ""));
            cb1.SelectedIndexChanged += cb1_SelectedIndexChanged;
            cb2 = new ComboBox();
            cb2.DropDownStyle = ComboBoxStyle.DropDownList;
            cb2.Items.Clear();
            cb2.Items.Add(CsConst.mstrINIDefault.IniReadValue("Public", "99655", ""));
            cb2.Items.Add(CsConst.mstrINIDefault.IniReadValue("Public", "99656", ""));
            cb2.SelectedIndexChanged += cb2_SelectedIndexChanged;
            cb3 = new ComboBox();
            cb3.DropDownStyle = ComboBoxStyle.DropDownList;
            cb3.Items.Clear();
            cb3.Items.Add(CsConst.mstrINIDefault.IniReadValue("Public", "99655", ""));
            cb3.Items.Add(CsConst.mstrINIDefault.IniReadValue("Public", "99656", ""));
            cb3.SelectedIndexChanged += cb3_SelectedIndexChanged;
            time1              = new TimeText(".");
            time1.TextChanged += time1_TextChanged;
            time2              = new TimeText(".");
            time2.TextChanged += time2_TextChanged;
            time3              = new TimeText(".");
            time3.TextChanged += time3_TextChanged;
            dgvMode.Controls.Add(cb1);
            dgvMode.Controls.Add(cb2);
            dgvMode.Controls.Add(cb3);
            dgvMode.Controls.Add(time1);
            dgvMode.Controls.Add(time2);
            dgvMode.Controls.Add(time3);
            setVisible(false);
        }