Esempio n. 1
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (mainLogForm != null)
     {
         mainLogForm.Close();
     }
     XMLConfig.SaveConfig(XMLConfig.GetAppConfigFilePath(), GlobalVar.Instance.config);
 }
Esempio n. 2
0
        private void InitConfig()
        {
            GlobalVar.Instance.config = XMLConfig.ReadConfig(XMLConfig.GetAppConfigFilePath());

            materialSingleLineTextField_ThreadNum.Text = GlobalVar.Instance.config.ThreadNum.ToString();
            materialSingleLineTextField_Inteval.Text   = GlobalVar.Instance.config.IntevalTime.ToString();
            comboBox_UA.Text = GlobalVar.Instance.config.UAType;
            materialCheckBox_AutoSaveResult.Checked = GlobalVar.Instance.config.IsAutoSaveResult;
            materialRadioButton_txt.Checked         = GlobalVar.Instance.config.IsSaveAsTxt;
            materialRadioButton_csv.Checked         = GlobalVar.Instance.config.IsSaveAsCsv;
            materialRadioButton_mysql.Checked       = GlobalVar.Instance.config.IsSaveAsMySQL;
        }