Пример #1
0
 private void AddNewCommand()
 {
     using (TwitchMonitor.UI.EditIrcCommandDialog dialog = new UI.EditIrcCommandDialog())
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             this.UpdateCommand(dialog.Command, dialog.Message);
         }
     }
 }
Пример #2
0
 private void EditSelectedCommand()
 {
     if (this.uiBotCommandListView.SelectedItems.Count > 0)
     {
         using (TwitchMonitor.UI.EditIrcCommandDialog dialog = new UI.EditIrcCommandDialog())
         {
             string selectedCommand = this.uiBotCommandListView.SelectedItems[0].Text;
             dialog.Command = selectedCommand;
             dialog.Message = this.BotCommands[selectedCommand];
             if (dialog.ShowDialog() == DialogResult.OK)
             {
                 this.UpdateCommand(dialog.Command, dialog.Message);
             }
         }
     }
 }