示例#1
0
        public override void Launch(LaunchConfig config)
        {
            switch (_cmdName.Trim())
            {
            case "RegisterExplorerContextMenu":
            {
                if (ShellIntegration.RegisterContextMenu())
                {
                    ErrorLog.Inst.ShowInfo("Explorer Context Menu Registration Completed.");
                }
            }
            break;

            case "WriteConfigRegistryValues":
            {
                var launchTool = Editors.EditorFactory.Inst.GetEditor(RuntimeInfo.Generic);

                launchTool.UpdateRegistry(Configs_Root.Inst.Configs);

                ErrorLog.Inst.ShowInfo("Environment Registry Integration completed");
            }
            break;

            case "UpdatePythonScriptFolder":
            {
                var pythonEnv = new PythonEnvironment();
                pythonEnv.UpdateScripts(Configs_Root.Inst);

                ErrorLog.Inst.ShowInfo("Updating Python Environment Scripts folder is completed");
            }
            break;
            }
        }
示例#2
0
        protected override bool LaunchCustom(LaunchConfig config)
        {
            switch (Tool.Path.Trim())
            {
            case "RegisterExplorerContextMenu":
            {
                if (ShellIntegration.RegisterContextMenu())
                {
                    ErrorLog.Inst.ShowInfo("Explorer Context Menu Registration Completed.");
                }
            }
            break;

            case "WriteConfigRegistryValues":
            {
                UpdateConfigRegistry(Configs_Root.Inst.Configs);

                ErrorLog.Inst.ShowInfo("Environment Registry Integration completed");
            }
            break;

            case "UpdatePythonScriptFolder":
            {
                UpdatePythonScripts(Configs_Root.Inst);

                ErrorLog.Inst.ShowInfo("Updating Python Environment Scripts folder is completed");
            }
            break;

            default:
            {
                ErrorLog.Inst.ShowError("Unable to find known command: {0}", Tool.Path);
            }
            break;
            }

            return(false);
        }