示例#1
0
        public override PresetItem Clone()
        {
            CustomPreset item = new CustomPreset();

            Clone(item);
            item.OnCommand  = this.OnCommand;
            item.OffCommand = this.OffCommand;

            return(item);
        }
示例#2
0
        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);
        }