public static void ProcessCommandParams() { // using http://www.ndesk.org/Options for parsing options var options = new OptionSet() { { "m|module=", "add a given module", v => ModulesSearchPath.Add(v) }, // { "h|?|help", "shows this message and exit", // v => show_help = v != null }, }; List <string> extraParams; try { extraParams = options.Parse(Environment.GetCommandLineArgs().Skip(1)); if (extraParams.Count > 0) { OpenOnStartupProjectName = Path.ChangeExtension(extraParams[0], ".brain"); } } catch (OptionException e) { MyLog.ERROR.WriteLine(e.Message); } }
public static void SetupModuleSearchPath() { //SearchPath.Add(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); //add bs folder name if (Directory.Exists(MyResources.GetEntryAssemblyPath() + "\\" + MODULES_PATH)) { foreach (string modulePath in Directory.GetDirectories(MyResources.GetEntryAssemblyPath() + "\\" + MODULES_PATH)) { ModulesSearchPath.Add(modulePath); } } }
public static void SetupModuleSearchPath() { var modulesPath = Path.Combine(MyResources.GetEntryAssemblyPath(), MODULES_PATH); if (Directory.Exists(modulesPath)) { foreach (string modulePath in Directory.GetDirectories(modulesPath)) { ModulesSearchPath.Add(modulePath); } } }