Beispiel #1
0
 private void uiNewKeyButton_Click(object sender, EventArgs e)
 {
     using (AddOrEditKeyCommandDialog dialog = new AddOrEditKeyCommandDialog())
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             this.AddOrEditCommand(dialog.GetKeyCommandEntry());
         }
     }
 }
Beispiel #2
0
        private void uiEditButton_Click(object sender, EventArgs e)
        {
            using (AddOrEditKeyCommandDialog dialog = new AddOrEditKeyCommandDialog())
            {
                if (this.uiKeyCommandsListView.SelectedItems.Count > 0)
                {
                    dialog.SetKeyCommandEntry(this.commands[this.uiKeyCommandsListView.SelectedItems[0]]);
                }

                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    this.AddOrEditCommand(dialog.GetKeyCommandEntry());
                }
            }
        }