Exemplo n.º 1
0
        //Constructors
        //____________________________________________________________

        public PresetControl()
        {
            _preset     = new TimePreset();
            PresetIndex = -1;
            InitializeComponent();
            RefreshControl();
        }
Exemplo n.º 2
0
        public PresetControl(int index, TimePreset preset)
        {
            _preset     = preset;
            PresetIndex = index;
            InitializeComponent();

            RefreshControl();
        }
Exemplo n.º 3
0
        public PresetControl(int index, TimePreset preset, bool enableDelete)
        {
            _preset     = preset;
            PresetIndex = index;
            InitializeComponent();

            DeletePresetLinkLabel.Enabled = enableDelete;

            RefreshControl();
        }
Exemplo n.º 4
0
        public void AddPreset(TimePreset newPreset, int index)
        {
            if (index == -1)
            {
                Settings.TimePresetCollection.Add(newPreset);
            }
            else if (index >= 0 && index < Settings.TimePresetCollection.Count)
            {
                Settings.TimePresetCollection[index] = newPreset;
            }

            UpdateSettings();
        }