/// <summary> /// 初始化程序中所有的实体DLL。 /// /// 此方法应该在程序初始化时调用。 /// </summary> internal static void InitCommandMetas() { if (RafyEnvironment.Location.IsWebUI) { //放在 Commands 下的文件夹会自动加入进来 var cmdDir = ConfigurationHelper.GetAppSettingOrDefault("RafyCommandsDir", "Scripts/Commands/"); var dir = RafyEnvironment.MapAbsolutePath(cmdDir); if (Directory.Exists(dir)) { WebCommands.AddByDirectory(dir); } //加入所有 Library 中 Commands 文件夹下的 js Resource。 foreach (var plugin in RafyEnvironment.GetAllPlugins()) { WebCommands.AddByAssembly(plugin.Assembly); } } else { //加入所有 Module 中 Commands。 foreach (var plugin in RafyEnvironment.GetAllPlugins()) { WPFCommands.AddByAssembly(plugin.Assembly); } } }
public Scanner() { var symbols = ConfigurationManager.AppSettings["SYMBOLS"]; symbolList = new List <string>(symbols.Split(',')); symbolList.RemoveAll(x => x == null); symbolList.RemoveAll(x => string.IsNullOrWhiteSpace(x)); webCommand = new WebCommands(); }
/// <summary> /// Initiates and registers commands /// </summary> private void InitCommands() { UtilityCommands utilityCmds = new UtilityCommands(); DebugCommands debugCmds = new DebugCommands(); SettingsCommands settingsCmds = new SettingsCommands(); ShutdownCommands shutdownCmds = new ShutdownCommands(); HelpCommands helpCmds = new HelpCommands(); MissionCommands missionCmds = new MissionCommands(); WebCommands webCmds = new WebCommands(); QuoteCommands quoteCmds = new QuoteCommands(); Var.client.MessageReceived += HandleCommandAsync; }
public Scanner() { var symbols = ConfigurationSettings.AppSettings["SYMBOLS"]; symbolList = new List <string>(symbols.Split(',')); symbolList.RemoveAll(x => x == null); symbolList.RemoveAll(x => string.IsNullOrWhiteSpace(x)); savefolderName = DateTime.Today.ToShortDateString() + "_" + "PulledData"; webCommand = new WebCommands(); }
internal static void Freeze() { WebCommands.FreezeItems(); }