Beispiel #1
0
        /// <summary>
        /// Saves the BotConfig
        /// Creates an empty BotConfig if none could be found
        /// </summary>
        public void SaveMaoubotConfig()
        {
            if (this.BotFile == null)
            {
                BotConfig.SaveToXml(MaoubotConfigPath, new BotConfig());
            }
            else
            {
                BotFile.EnableSubMessage = this.checkBoxEnableSubMessage.Checked;
                BotFile.SubMessageNew    = this.textBoxSubMessageNew.Text;
                BotFile.SubMessageResub  = this.textBoxSubMessageResub.Text;

                BotFile.EnableCommands = this.checkBoxEnableCommands.Checked;

                BotConfig.SaveToXml(MaoubotConfigPath, BotFile);
            }
        }