/// <inheritdoc /> protected override bool StoreControlValue(Control control) { #if !STANDALONEGUI if (this.ProjectMgr == null) { return(false); } #else if (this.CurrentProject == null) { return(false); } #endif if (control.Name == "lblNamespaceSummaryState") { if (summariesChanged) { #if !STANDALONEGUI this.ProjectMgr.SetProjectProperty("NamespaceSummaries", namespaceSummaries.ToXml()); #else this.CurrentProject.MSBuildProject.SetProperty("NamespaceSummaries", namespaceSummaries.ToXml()); #endif summariesChanged = false; } return(true); } return(false); }
//===================================================================== /// <summary> /// Edit the namespace summaries /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event arguments</param> private void btnEditNamespaceSummaries_Click(object sender, RoutedEventArgs e) { var args = new ApplyChangesEventArgs(); this.ApplyChanges?.Invoke(this, args); if (args.ChangesApplied) { string oldSummaries, newSummaries; var dlg = new NamespaceSummaryItemEditorDlg(namespaceSummaries); oldSummaries = namespaceSummaries.ToXml(); dlg.ShowModalDialog(); newSummaries = namespaceSummaries.ToXml(); // If it changes, mark the page as dirty and update the summary info if (oldSummaries != newSummaries) { this.SummariesModified?.Invoke(this, EventArgs.Empty); this.HasChanges = true; this.UpdateNamespaceSummaryInfo(); } } }