示例#1
0
        /// <summary>
        /// Opens the TextCommandDialog to add a new command
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonTextCommandAdd_Click(object sender, EventArgs e)
        {
            using (TextCommandDialog tcd = new TextCommandDialog())
            {
                tcd.ShowDialog();
                if (tcd.DialogResult == DialogResult.OK)
                {
                    TextCommand tc = tcd.Result;
                    BotFile.AddCommand(tc);
                    RefreshCommands();

                    SaveMaoubotConfig();
                }
            }
        }