示例#1
0
 private static Bot InstantiateBot()
 {
     var bot = new Bot
     {
         IsAcceptingUserInput = false
     };
     bot.loadSettings();
     var combine = Path.Combine(ConfigurationManager.AppSettings.Get("aimldirectory"), "Bot.bin");
     if (File.Exists(combine))
         bot.LoadFromBinaryFile(combine);
     else 
         bot.LoadAimlFromFiles();
     bot.IsAcceptingUserInput = true;
     return bot;
 }