static CustomizationGuiApi() { assembly = Assembly.GetEntryAssembly(); CUSTOM_NAMESPACE = (from t in assembly.GetExportedTypes() where t.Name == CUSTOM_BOT_CLASS_NAME select t.Namespace).FirstOrDefault(); if (CUSTOM_NAMESPACE == null) LogMessage.Exit("Could not find class " + CUSTOM_BOT_CLASS_NAME + " in the entry assembly."); bot_gui_type = assembly.GetType(CUSTOM_NAMESPACE + "." + CUSTOM_BOT_GUI_CLASS_NAME); if (bot_gui_type == null) { Log.Inform("Could not find class " + CUSTOM_NAMESPACE + "." + CUSTOM_BOT_GUI_CLASS_NAME + " in the entry assembly."); BotGui = new BotGui(); } else BotGui = (BotGui)Activator.CreateInstance(bot_gui_type); bot_thread_control_type = BotGui.GetBotThreadControlType(); }
static CustomizationGuiApi() { assembly = Assembly.GetEntryAssembly(); CUSTOM_NAMESPACE = (from t in assembly.GetExportedTypes() where t.Name == CUSTOM_BOT_CLASS_NAME select t.Namespace).FirstOrDefault(); if (CUSTOM_NAMESPACE == null) { LogMessage.Exit("Could not find class " + CUSTOM_BOT_CLASS_NAME + " in the entry assembly."); } bot_gui_type = assembly.GetType(CUSTOM_NAMESPACE + "." + CUSTOM_BOT_GUI_CLASS_NAME); if (bot_gui_type == null) { Log.Inform("Could not find class " + CUSTOM_NAMESPACE + "." + CUSTOM_BOT_GUI_CLASS_NAME + " in the entry assembly."); BotGui = new BotGui(); } else { BotGui = (BotGui)Activator.CreateInstance(bot_gui_type); } bot_thread_control_type = BotGui.GetBotThreadControlType(); }