public override PresetItem Clone() { TweakPreset item = new TweakPreset(); Clone(item); item.TweakGroup = this.TweakGroup; item.Tweaks = this.Tweaks.ToDictionary(entry => entry.Key, entry => entry.Value); return(item); }
public void PinTweak(string TweakGroup, string name) { PresetGroup preset = FindPreset(name); TweakPreset item = new TweakPreset(); item.TweakGroup = TweakGroup; item.Sync(); // gets the name and so on preset.Items.Add(item.guid, item); UpdatePreset(preset); }
public static PresetItem New(PresetType Type) { PresetItem item = null; switch (Type) { case PresetType.Tweak: item = new TweakPreset(); break; case PresetType.Firewall: item = new FirewallPreset(); break; case PresetType.Custom: item = new CustomPreset(); break; default: return(null); } item.Type = Type; return(item); }