public override void LoadSettings() { Loading = true; try { _control.NodeExeArguments = Project.GetUnevaluatedProperty(NodeProjectProperty.NodeExeArguments); _control.NodeExePath = Project.GetUnevaluatedProperty(NodeProjectProperty.NodeExePath); _control.ScriptFile = Project.GetUnevaluatedProperty(CommonConstants.StartupFile); _control.ScriptArguments = Project.GetUnevaluatedProperty(NodeProjectProperty.ScriptArguments); _control.WorkingDirectory = Project.GetUnevaluatedProperty(CommonConstants.WorkingDirectory); _control.LaunchUrl = Project.GetUnevaluatedProperty(NodeProjectProperty.LaunchUrl); _control.NodejsPort = Project.GetUnevaluatedProperty(NodeProjectProperty.NodejsPort); _control.DebuggerPort = Project.GetUnevaluatedProperty(NodeProjectProperty.DebuggerPort); _control.Environment = Project.GetUnevaluatedProperty(NodeProjectProperty.Environment); // Attempt to parse the boolean. If we fail, assume it is true. bool startWebBrowser; if (!Boolean.TryParse(Project.GetUnevaluatedProperty(NodeProjectProperty.StartWebBrowser), out startWebBrowser)) { startWebBrowser = true; } _control.StartWebBrowser = startWebBrowser; } finally { Loading = false; } }
public static Application LoadFrom(CommonProjectNode proj) { var x = new Application(); x.OutputType = OutputTypeFromString(proj.GetUnevaluatedProperty("OutputType")); Utils.FromString(proj.GetUnevaluatedProperty("CrateName"), out x.crateName); Utils.FromString(proj.GetUnevaluatedProperty("BuildDylib"), out x.buildDylib); Utils.FromString(proj.GetUnevaluatedProperty("BuildRlib"), out x.buildRlib); Utils.FromString(proj.GetUnevaluatedProperty("BuildStaticlib"), out x.buildStaticlib); return(x); }