Пример #1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            backgroundWorker1.WorkerReportsProgress      = true;
            backgroundWorker1.WorkerSupportsCancellation = true;
            CsConst.mstrDefaultPath = Application.StartupPath + @"\Database\Easy_Design.mdb";
            LoadControlsText.LoadButtonCoontrolTypeFromDatabaseToPublicClass();
            HDLSysPF.GetWeekdaysFromPublicStruct();
            //LoadControlsText.CheckAndLoadControlsNew();
            LoadControlsText.LoadControlsTextIdListFromXML();
            LoadControlsText.DisplayTextToFormWhenFirstShow(this);

            CsConst.mstrINIDefault = new IniFile(Application.StartupPath + @"\ini\LAN0.ini");
            ButtonMode.LoadButtonModeFromDatabaseToPublicClass();
            DryMode.LoadButtonModeFromDatabaseToPublicClass();
            ButtonControlType.LoadButtonCoontrolTypeFromDatabaseToPublicClass();
            DryControlType.LoadButtonCoontrolTypeFromDatabaseToPublicClass();
            DeviceTypeList.LoadButtonCoontrolTypeFromDatabaseToPublicClass();
            ControlTemplates.ReadAllGroupCommandsFrmDatabase();


            HDLSysPF.AutoScale((Form)sender);

            HDLSysPF.AddedDevicesIndexToAPublicListInt();
            GetDeviceList();
            // dgOnline.RowCount = 28;
        }
Пример #2
0
 private void frmMain_SizeChanged(object sender, EventArgs e)
 {
     HDLSysPF.AutoScale((Form)sender);
 }
Пример #3
0
        private void frmTool_Load(object sender, EventArgs e)
        {
            HDLSysPF.AutoScale((Form)sender);
            isLoad = true;

            mbyTmptLocalSubNetID   = CsConst.mbytLocalSubNetID;
            mbyTmptLocalDeviceID   = CsConst.mbytLocalDeviceID;
            mintTmpLocalDeviceType = CsConst.mintLocalDeviceType;
            //cl2.Width = rtbRev.Width - 130;

            if (CsConst.iLanguageId == 1)
            {
                cboCMD.Items.Clear();
                cboCMD.Items.AddRange(CsConst.strAryCMD);
            }
            cboCMD.SelectedIndex = 0;

            IniFile iniFile = new IniFile(Application.StartupPath + @"\ini\Default.ini");

            numDesSub.Text = iniFile.IniReadValue("Tool", "SubNetID", "0");
            numDesDev.Text = iniFile.IniReadValue("Tool", "DeviceID", "0");
            tbCMD.Text     = Convert.ToString(iniFile.IniReadValue("Tool", "Command", "E"));
            txtTime.Text   = Convert.ToString(iniFile.IniReadValue("Tool", "Time", "10"));
            string rb = Convert.ToString(iniFile.IniReadValue("Tool", "RB", "1"));

            switch (rb)
            {
            case "1": rb1.Checked = true; break;

            case "2": rb2.Checked = true; break;

            case "3": rb3.Checked = true; break;

            case "4": rb4.Checked = true; break;

            case "5": rb5.Checked = true; break;
            }
            isLoad = false;
            numDesSub_ValueChanged(numDesSub, null);
            numDesSub_ValueChanged(numDesDev, null);

            backgroundWorker1.WorkerReportsProgress      = true;
            backgroundWorker1.WorkerSupportsCancellation = true;

            if (rb1.Checked)
            {
                rb1_CheckedChanged(rb1, null);
            }
            if (rb2.Checked)
            {
                rb1_CheckedChanged(rb2, null);
            }
            if (rb3.Checked)
            {
                rb1_CheckedChanged(rb3, null);
            }
            if (rb4.Checked)
            {
                rb1_CheckedChanged(rb4, null);
            }
            if (rb5.Checked)
            {
                rb1_CheckedChanged(rb5, null);
            }
        }