示例#1
0
 public Item(Config parent, string name, string value)
 {
     this.Parent = parent;
     this.Name = name;
     this.Value = value;
     this.Type = "";
     this.DefaultValue = "";
     this.MinValue = "";
     this.MaxValue = "";
     this.Info = "";
     this.Category = "";
     this.SimpleName = "";
 }
示例#2
0
 private void Configs_DoubleClick(object sender, MouseButtonEventArgs e)
 {
     var config = LoadedConfig[listBox_configs.SelectedItem.ToString()];
     if(!config.Equals(selectedConfig) && editing)
     {
         return;
     }
     else
     {
         selectedConfig = config;
         editing = false;
         button_overwrite.IsEnabled = false;
         config.ReadFile();
         TableUpdate(config);
     }
     
 }
示例#3
0
 private void TableUpdate(Config config)
 {
     InitTable();
     foreach(var item in config.Items.Values)
     {
         DataRow newRowItem;
         newRowItem = dataTable.NewRow();
         newRowItem["data_category"] = item.Category;
         newRowItem["data_name"] = item.Name;
         newRowItem["data_type"] = item.Type;
         newRowItem["data_value"] = item.Value;
         dataTable.Rows.Add(newRowItem);
     }
 }