internal void deletePreset(configPreset preset) { if (presets.Contains(preset)) { preset.removeFile(); presets.Remove(preset); } }
internal void createPreset(string presetName) { if (Config != null) { configPreset preset = new configPreset(presetName, this); presets.Add(preset); } }
public void importPreset(String filename) { sweetConfig newp = new sweetConfig(filename); String presetname = Path.GetFileNameWithoutExtension(filename); configPreset npreset = new configPreset(presetname, game, newp); npreset.savePreset(); game.presets.Add(npreset); refreshUI(); }
internal void loadPreset(configPreset preset) { foreach (FXSetting s in FXSettings) { if (preset.haveSetting(s.name)) { s.value = preset.getValueOf(s.name); } } }
private void refreshUI() { presetList.DataSource = null; presetList.DataSource = game.presets; if (presetList.SelectedIndex != -1) { configPreset preset = game.presets.ElementAt(presetList.SelectedIndex); sweetConfig clone = game.Config.clone(); clone.loadPreset(preset); textBox2.Lines = showDiff.formatChanges(clone.diffConfig(game.Config), true); activePreset = preset; } else { activePreset = null; } button5.Visible = true; }
public void loadPreset(configPreset preset) { Config.loadPreset(preset); }