/// <summary> /// Opens the TextCommandDialog to edit the current command /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonTextCommandEdit_Click(object sender, EventArgs e) { if (comboBoxTextCommands.SelectedIndex == -1) { RefreshCommands(); return; } using (TextCommandDialog tcd = new TextCommandDialog(BotFile.TextCommands[comboBoxTextCommands.SelectedIndex])) { tcd.ShowDialog(); if (tcd.DialogResult == DialogResult.OK) { TextCommand tc = tcd.Result; BotFile.UpdateCommand(tc); //RefreshCommands(); SaveMaoubotConfig(); } } }