private void btnAdd_Click(object sender, EventArgs e) { Workflow wf = new Workflow("New Workflow", new HotkeySetting(), false); WindowWorkflow wwf = new WindowWorkflow(wf); if (wwf.ShowDialog() == DialogResult.OK) { _manager.Workflows.Add(wf); HotkeySelectionControl control = new HotkeySelectionControl(wf); control.HotkeyChanged += new EventHandler(control_HotkeyChanged); flpHotkeys.Controls.Add(control); lblHelp.Text = "Your new hotkey will not be active until you close Settings."; } }
private void Configure() { foreach (HotkeySelectionControl hksc in flpHotkeys.Controls) { if (hksc.Checked) { WindowWorkflow wwf = new WindowWorkflow(hksc.Workflow); wwf.ShowDialog(); hksc.set_HotkeyDescription(wwf.Workflow.HotkeyConfig.Description); hksc.Workflow = wwf.Workflow; break; } } }