private void ExportHighlightingColors_OnClick(object sender, RoutedEventArgs e) { ImportExportTools.DoExportSettingsWindow(OwnerSettingsWindow, "Highlighting Colors (*.xml)|*.xml;", "LSLCCEditor_HighlightingColors.xml", writer => { var x = new XmlSerializer(typeof(HighlightingSettings)); var settings = new HighlightingSettings { BackgroundColor = EditorControlTheme.BackgroundColor, BasicTextColor = EditorControlTheme.ForegroundColor, HighlightingColors = EditorControlTheme.HighlightingColors }; x.Serialize(writer, settings); }); }
/// <summary> /// Performs the QuickFix, inserts the configured modifier into the location specified by /// the violation. /// </summary> /// <param name="solution"> /// Current Solution. /// </param> /// <param name="textControl"> /// Current Text Control to modify. /// </param> public void Execute(ISolution solution, ITextControl textControl) { using (ChangeSeverityDialog dialog = new ChangeSeverityDialog()) { HighlightingSettings settings = HighlightingSettingsManager.Instance.Settings.Clone(); HighlightingSettingsManager.ConfigurableSeverityItem severityItem = HighlightingSettingsManager.Instance.GetSeverityItem(this.HighlightID); dialog.Severity = settings.GetSeverity(this.HighlightID); dialog.Text = "Inspection options for \"" + severityItem.Title + "\""; if (dialog.ShowDialog(Shell.Instance.GetComponent <UIApplication>().MainWindow) == DialogResult.OK) { settings.SetSeverity(this.HighlightID, dialog.Severity); HighlightingSettingsManager.Instance.Settings = settings; Daemon.GetInstance(solution).Invalidate(); } } }