/// <summary> /// Initializes a new instance of the BuildIntegrationOptions class. /// </summary> /// <param name="project">The MSBuild project.</param> public BuildIntegrationOptions(Project project) { Param.RequireNotNull(project, "project"); this.project = project; this.setting = ProjectUtilities.GetBuildIntegrationInProject(this.project); this.InitializeComponent(); }
/// <summary> /// Saves the data and clears the dirty flag. /// </summary> /// <returns>Returns true if the data is saved, false if not.</returns> public bool Apply() { ProjectUtilities.BuildIntegration newSetting = ProjectUtilities.BuildIntegration.None; if (this.checkBox.Checked) { newSetting = this.radioButtonAsWarning.Checked ? ProjectUtilities.BuildIntegration.TreatErrorAsWarning : ProjectUtilities.BuildIntegration.TreatErrorAsError; } ProjectUtilities.SetBuildIntegrationInProject(this.project, newSetting); this.setting = newSetting; this.dirty = false; this.tabControl.DirtyChanged(); return(true); }
/// <summary> /// Saves the data and clears the dirty flag. /// </summary> /// <returns>Returns true if the data is saved, false if not.</returns> public bool Apply() { ProjectUtilities.BuildIntegration newSetting = ProjectUtilities.BuildIntegration.None; if (this.checkBox.Checked) { newSetting = this.radioButtonAsWarning.Checked ? ProjectUtilities.BuildIntegration.TreatErrorAsWarning : ProjectUtilities.BuildIntegration.TreatErrorAsError; } ProjectUtilities.SetBuildIntegrationInProject(this.project, newSetting); this.setting = newSetting; this.dirty = false; this.tabControl.DirtyChanged(); return true; }