static void Main(string[] args) { Console.CancelKeyPress += Console_CancelKeyPress; if (File.Exists("Bot/ConnectionConfig.suixml")) { bot = new SuiBot(); bot.Connect(); while (bot.IsRunning) { System.Threading.Thread.Sleep(1); } } else { var configFile = new SuiBot_Core.Storage.ConnectionConfig(); configFile.Save(); Console.WriteLine("No connection config was found, so a new file was created."); if (!File.Exists("Bot/Config.xml")) { var coreConfig = new SuiBot_Core.Storage.CoreConfig(); coreConfig.ChannelsToJoin.Add("ExampleChannel"); coreConfig.Save(); Console.WriteLine("No core config was found, so a new file was created."); } Console.ReadKey(); } }
public EditListOfChannels(SuiBot_Core.Storage.CoreConfig CoreConfig) { InitializeComponent(); this.CoreConfig = CoreConfig; this.DataContext = CoreConfig; }