Ejemplo n.º 1
0
 /// <summary>
 /// Handles the Click event of System.Windows.Forms.Button.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The event arguments.</param>
 private void EditCommandButton_Click(object sender, EventArgs e)
 {
     using (CommandDialog dialog = new CommandDialog(this.commandsListBox.SelectedItem.ToString()))
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             this.commandsListBox.Items[this.commandsListBox.SelectedIndex] = dialog.Command;
             this.IsDirty = true;
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Handles the Click event of System.Windows.Forms.Button.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The event arguments.</param>
 private void AddCommandButton_Click(object sender, EventArgs e)
 {
     using (CommandDialog dialog = new CommandDialog())
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             this.commandsListBox.Items.Add(dialog.Command);
             this.IsDirty = true;
         }
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Handles the Click event of System.Windows.Forms.Button.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The event arguments.</param>
 private void EditCommandButton_Click(object sender, EventArgs e)
 {
     using (CommandDialog dialog = new CommandDialog(this.commandsListBox.SelectedItem.ToString()))
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             this.commandsListBox.Items[this.commandsListBox.SelectedIndex] = dialog.Command;
             this.IsDirty = true;
         }
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Handles the Click event of System.Windows.Forms.Button.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The event arguments.</param>
 private void AddCommandButton_Click(object sender, EventArgs e)
 {
     using (CommandDialog dialog = new CommandDialog())
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             this.commandsListBox.Items.Add(dialog.Command);
             this.IsDirty = true;
         }
     }
 }