public DiagnosticSummaryMargin(IWpfTextView textView) { _textView = textView; _isDisposed = false; _diagnosticService = DiagnosticService.GetOrCreate(textView); _summaryControl = new DiagnosticSummaryControl { CrispImage = { Moniker = GetImageMoniker() } }; _summaryControl.MouseLeftButtonDown += OnMouseLeftButtonDown; _diagnosticService.DiagnosticsChanging += OnDiagnosticsChanging; _diagnosticService.DiagnosticsChanged += OnDiagnosticsChanged; _textView.Options.OptionChanged += OnTextViewOptionChanged; _textView.Closed += OnTextViewClosed; UpdateVisibility(); UpdateSummary(); }
public DiagnosticStripeMargin(IWpfTextView textView, IVerticalScrollBar scrollBar, IEditorFormatMapService editorFormatMapService) { _textView = textView; _isDisposed = false; _scrollBar = scrollBar; _editorFormatMap = editorFormatMapService.GetEditorFormatMap(textView); _diagnosticService = DiagnosticService.GetOrCreate(textView); ClipToBounds = true; Background = null; VerticalAlignment = VerticalAlignment.Stretch; Focusable = false; Width = 10; RenderOptions.SetEdgeMode(this, EdgeMode.Aliased); _diagnosticService.DiagnosticsChanging += OnDiagnosticsChanging; _diagnosticService.DiagnosticsChanged += OnDiagnosticsChanged; _editorFormatMap.FormatMappingChanged += OnFormatMappingChanged; _scrollBar.TrackSpanChanged += OnTrackSpanChanged; _textView.LayoutChanged += OnTextViewLayoutChanged; _textView.Closed += OnTextViewClosed; }