public override PresetItem Clone() { CustomPreset item = new CustomPreset(); Clone(item); item.OnCommand = this.OnCommand; item.OffCommand = this.OffCommand; return(item); }
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); }