private void button_0_Click(object sender, EventArgs e)
 {
     this.ruleConfigInfo_0 = (RuleConfigInfo)ConfigFileManager.LoadConfig(this.comboBox_0.Text, this.ruleConfigInfo_0);
     this.propertyInfo_0   = this.ruleConfigInfo_0.GetType().GetProperties();
     for (int i = 0; i < (int)this.propertyInfo_0.Length; i++)
     {
         this.listBox_0.Items.Add(this.propertyInfo_0[i].Name);
     }
     this.button_0.Enabled   = false;
     this.comboBox_0.Enabled = false;
     this.button_1.Enabled   = true;
     ConfigFileManager.SaveConfig(this.comboBox_0.Text, this.ruleConfigInfo_0);
 }
 private void button_1_Click(object sender, EventArgs e)
 {
     this.method_0();
     this.int_0 = -1;
     ConfigFileManager.SaveConfig(this.comboBox_0.Text, this.ruleConfigInfo_0);
     this.button_0.Enabled   = true;
     this.comboBox_0.Enabled = true;
     this.listBox_0.Items.Clear();
     this.comboBox_0.Items.Clear();
     string[] strArrays = IO.LoadRules();
     if ((int)strArrays.Length > 0)
     {
         string[] strArrays1 = strArrays;
         for (int i = 0; i < (int)strArrays1.Length; i++)
         {
             object obj = strArrays1[i];
             this.comboBox_0.Items.Add(obj);
         }
         this.comboBox_0.Text = this.comboBox_0.Items[0].ToString();
     }
 }
示例#3
0
 /// <summary>
 /// 保存文件
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public static void SaveConfig(RegConfigInfo info)
 {
     _configFileManager.ConfigInfo = info;
     _configFileManager.SaveConfig();
 }
示例#4
0
 /// <summary>
 /// 保存文件
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public static void SaveConfig(SerializableStringDictionary info)
 {
     _configFileManager.ConfigInfo = info;
     _configFileManager.SaveConfig();
 }