/// <summary> /// 初始化AcDown核心 /// </summary> /// <param name="startupFolderPath">起始路径</param> /// <param name="uiDelegates">UI委托</param> /// <param name="externalPlugins">额外加载的内部插件</param> public static void Initialize(string startupFolderPath, UIDelegateContainer uiDelegates, Collection <IPlugin> internalPlugins) { StartupPath = startupFolderPath; //如果目录不存在则创建 if (!Directory.Exists(startupFolderPath)) { Directory.CreateDirectory(startupFolderPath); } //全局设置 ConfigManager = new ConfigManager(); ConfigManager.LoadSettings(); //记录 Logging.Initialize(); //插件管理器 PluginManager = new PluginManager(); PluginManager.LoadPlugins(); foreach (IPlugin plugin in internalPlugins) { PluginManager.LoadPlugin(plugin); } //委托 UIDelegates = uiDelegates; //任务管理器 TaskManager = new TaskManager(); TaskManager.LoadAllTasks(); }
/// <summary> /// 初始化AcDown核心 /// </summary> /// <param name="startupFolderPath">起始路径</param> /// <param name="uiDelegates">UI委托</param> /// <param name="externalPlugins">额外加载的内部插件</param> public static void Initialize(string startupFolderPath, UIDelegateContainer uiDelegates, Collection<IPlugin> internalPlugins) { StartupPath = startupFolderPath; //如果目录不存在则创建 if (!Directory.Exists(startupFolderPath)) { Directory.CreateDirectory(startupFolderPath); } //全局设置 ConfigManager = new ConfigManager(); ConfigManager.LoadSettings(); //记录 Logging.Initialize(); //插件管理器 PluginManager = new PluginManager(); PluginManager.LoadPlugins(); foreach (IPlugin plugin in internalPlugins) { PluginManager.LoadPlugin(plugin); } //委托 UIDelegates = uiDelegates; //任务管理器 TaskManager = new TaskManager(); TaskManager.LoadAllTasks(); }
/// <summary> /// 初始化AcDown核心 /// </summary> /// <param name="startupFolderPath">起始路径</param> /// <param name="uiDelegates">UI委托</param> /// <param name="externalPlugins">额外加载的内部插件</param> public static void Initialize(string startupFolderPath, UIDelegateContainer uiDelegates, Collection <IPlugin> internalPlugins) { /* 2012.08.27修改 不访问本地目录 * StartupPath = startupFolderPath; * //如果目录不存在则创建 * if (!Directory.Exists(startupFolderPath)) * { * Directory.CreateDirectory(startupFolderPath); * } */ //全局设置 ConfigManager = new ConfigManager(); ConfigManager.LoadSettings(); //记录 Logging.Initialize(); //插件管理器 PluginManager = new PluginManager(); PluginManager.LoadPlugins(); foreach (IPlugin plugin in internalPlugins) { PluginManager.LoadPlugin(plugin); } //委托 UIDelegates = uiDelegates; // 2012.08.27修改 不从硬盘里读取旧任务 //任务管理器 //TaskManager = new TaskManager(); //TaskManager.LoadAllTasks(); }