예제 #1
0
 private void Edit(HotkeySelectionControl selectionControl)
 {
     using (TaskSettingsForm taskSettingsForm = new TaskSettingsForm(selectionControl.Setting.TaskSettings))
     {
         taskSettingsForm.ShowDialog();
         selectionControl.UpdateDescription();
     }
 }
예제 #2
0
        private HotkeySelectionControl AddHotkeySelectionControl(HotkeySettings hotkeySetting)
        {
            HotkeySelectionControl control = new HotkeySelectionControl(hotkeySetting);

            control.Margin            = new Padding(0, 0, 0, 2);
            control.SelectedChanged  += control_SelectedChanged;
            control.HotkeyChanged    += control_HotkeyChanged;
            control.LabelDoubleClick += control_LabelDoubleClick;
            flpHotkeys.Controls.Add(control);
            return(control);
        }
예제 #3
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
     if (Selected != null)
     {
         manager.UnregisterHotkey(Selected.Setting);
         HotkeySelectionControl hsc = FindSelectionControl(Selected.Setting);
         if (hsc != null)
         {
             flpHotkeys.Controls.Remove(hsc);
         }
         Selected = null;
         UpdateButtons();
     }
 }
예제 #4
0
 private void btnDuplicate_Click(object sender, EventArgs e)
 {
     if (Selected != null)
     {
         HotkeySettings hotkeySetting = new HotkeySettings();
         hotkeySetting.TaskSettings = Selected.Setting.TaskSettings.Copy();
         hotkeySetting.TaskSettings.WatchFolderEnabled = false;
         hotkeySetting.TaskSettings.WatchFolderList    = new List <WatchFolderSettings>();
         manager.Hotkeys.Add(hotkeySetting);
         HotkeySelectionControl control = AddHotkeySelectionControl(hotkeySetting);
         control.Selected = true;
         Selected         = control;
         UpdateCheckStates();
         control.Focus();
     }
 }
예제 #5
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            HotkeySettings hotkeySetting = new HotkeySettings();

            hotkeySetting.TaskSettings = TaskSettings.GetDefaultTaskSettings();
            manager.Hotkeys.Add(hotkeySetting);
            HotkeySelectionControl control = AddHotkeySelectionControl(hotkeySetting);

            control.Selected = true;
            Selected         = control;
            UpdateButtons();
            UpdateCheckStates();
            control.Focus();
            Update();
            EditSelected();
        }
예제 #6
0
 private HotkeySelectionControl AddHotkeySelectionControl(HotkeySettings hotkeySetting)
 {
     HotkeySelectionControl control = new HotkeySelectionControl(hotkeySetting);
     control.Margin = new Padding(0, 0, 0, 2);
     control.SelectedChanged += control_SelectedChanged;
     control.HotkeyChanged += control_HotkeyChanged;
     control.LabelDoubleClick += control_LabelDoubleClick;
     flpHotkeys.Controls.Add(control);
     return control;
 }
예제 #7
0
 private void Edit(HotkeySelectionControl selectionControl)
 {
     using (TaskSettingsForm taskSettingsForm = new TaskSettingsForm(selectionControl.Setting.TaskSettings))
     {
         taskSettingsForm.ShowDialog();
         selectionControl.UpdateDescription();
     }
 }
예제 #8
0
 private void control_SelectedChanged(object sender, EventArgs e)
 {
     Selected = (HotkeySelectionControl)sender;
     UpdateButtons();
     UpdateCheckStates();
 }
예제 #9
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
     if (Selected != null)
     {
         manager.UnregisterHotkey(Selected.Setting);
         HotkeySelectionControl hsc = FindSelectionControl(Selected.Setting);
         if (hsc != null) flpHotkeys.Controls.Remove(hsc);
         Selected = null;
         UpdateButtons();
     }
 }
예제 #10
0
 private void btnDuplicate_Click(object sender, EventArgs e)
 {
     if (Selected != null)
     {
         HotkeySettings hotkeySetting = new HotkeySettings();
         hotkeySetting.TaskSettings = Selected.Setting.TaskSettings.Copy();
         hotkeySetting.TaskSettings.WatchFolderEnabled = false;
         hotkeySetting.TaskSettings.WatchFolderList = new List<WatchFolderSettings>();
         manager.Hotkeys.Add(hotkeySetting);
         HotkeySelectionControl control = AddHotkeySelectionControl(hotkeySetting);
         control.Selected = true;
         Selected = control;
         UpdateCheckStates();
         control.Focus();
     }
 }
예제 #11
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     HotkeySettings hotkeySetting = new HotkeySettings();
     hotkeySetting.TaskSettings = TaskSettings.GetDefaultTaskSettings();
     manager.Hotkeys.Add(hotkeySetting);
     HotkeySelectionControl control = AddHotkeySelectionControl(hotkeySetting);
     control.Selected = true;
     Selected = control;
     UpdateButtons();
     UpdateCheckStates();
     control.Focus();
     Update();
     EditSelected();
 }
예제 #12
0
 private void control_SelectedChanged(object sender, EventArgs e)
 {
     Selected = (HotkeySelectionControl)sender;
     UpdateButtons();
     UpdateCheckStates();
 }
예제 #13
0
        private void control_HotkeyChanged(object sender, EventArgs e)
        {
            HotkeySelectionControl control = (HotkeySelectionControl)sender;

            manager.RegisterHotkey(control.Setting);
        }