예제 #1
0
        public void LoadSettings(ProjectConfig[] configs)
        {
            originalConfig = Configuration.Debug.LoadFrom(configs);
            config         = originalConfig.Clone();

            radioButton1.CheckedChanged += (src, arg) => {
                if (radioButton1.Checked)
                {
                    config.StartAction = Configuration.StartAction.Project;
                }
                else
                {
                    config.StartAction = Configuration.StartAction.Program;
                }
                externalProg.Enabled = !radioButton1.Checked;
                browseProg.Enabled   = !radioButton1.Checked;
            };
            radioButton1.Checked = config.StartAction == Configuration.StartAction.Project;
            radioButton2.Checked = !radioButton1.Checked;

            externalProg.Text         = config.ExternalProgram;
            externalProg.TextChanged += (src, arg) => config.ExternalProgram = externalProg.Text;

            commandLineArgs.Text         = config.CommandLineArgs;
            commandLineArgs.TextChanged += (src, arg) => config.CommandLineArgs = commandLineArgs.Text;

            workDir.Text         = config.WorkingDir;
            workDir.TextChanged += (src, arg) => config.WorkingDir = workDir.Text;

            debuggerScript.Text         = config.DebuggerScript;
            debuggerScript.TextChanged += (src, erg) => config.DebuggerScript = debuggerScript.Text;

            config.Changed += (src, arg) => isDirty(config.HasChangedFrom(originalConfig));
        }
예제 #2
0
 public RustProjectLauncher(RustProjectNode project)
 {
     Utilities.ArgumentNotNull("project", project);
     string currConfig = project.GetProjectProperty(ProjectFileConstants.Configuration);
     RustProjectConfig projectConfig = (RustProjectConfig)project.ConfigProvider.GetProjectConfiguration(currConfig);
     debugConfig = Configuration.Debug.LoadFrom(new[] { projectConfig.UserCfg });
     if (debugConfig.StartAction == Configuration.StartAction.Project &&
         project.GetProjectProperty("OutputType") != "exe")
     {
         throw new InvalidOperationException("A project with an Output Type of Library cannot be started directly.");
     }
     this.environment = new LauncherEnvironment(project, debugConfig, projectConfig);
 }
예제 #3
0
 public void ApplyConfig(ProjectConfig[] configs)
 {
     config.SaveTo(configs);
     originalConfig = config.Clone();
 }
예제 #4
0
 public LauncherEnvironment(RustProjectNode project, Configuration.Debug debugConfig, RustProjectConfig projConfig)
 {
     this.project       = project;
     this.debugConfig   = debugConfig;
     this.projectConfig = projConfig;
 }
예제 #5
0
 public void ApplyConfig(MsBuildConfiguration[] configs)
 {
     config.SaveTo(configs);
     originalConfig = config.Clone();
 }