//===================================================================== /// <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(); } } }
/// <summary> /// Edit the project's API filter /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event arguments</param> private void btnEditAPIFilter_Click(object sender, RoutedEventArgs e) { var args = new ApplyChangesEventArgs(); this.ApplyChanges?.Invoke(this, args); if (args.ChangesApplied) { string oldFilter, newFilter; var dlg = new ApiFilterEditorDlg(apiFilter); oldFilter = apiFilter.ToXml(); dlg.ShowModalDialog(); newFilter = apiFilter.ToXml(); // If it changes, mark the page as dirty and update the summary info if (oldFilter != newFilter) { this.PropertyChanged?.Invoke(this, EventArgs.Empty); this.ApiFilterHasChanges = true; this.UpdateApiFilterInfo(); } } }