private void OnFormatItemsChanged(object sender, FormatItemsEventArgs args) { if (args.ChangedItems.Any(i => i == "Comment")) { ReloadColors(); CommentsColorChanged?.Invoke(textView, CommentsForeground, CommentsBackground); } }
public void Dispose() { editorFormatMap.FormatMappingChanged -= OnFormatItemsChanged; textView.BackgroundBrushChanged -= OnBackgroundBrushChanged; textView.ZoomLevelChanged -= OnZoomChanged; foreach (CommentsColorChangedHandler method in CommentsColorChanged.GetInvocationList()) { CommentsColorChanged -= method; } foreach (ZoomChangedHandler method in ZoomChanged.GetInvocationList()) { ZoomChanged -= method; } }
private void OnBackgroundBrushChanged(object sender, BackgroundBrushChangedEventArgs args) { ReloadColors(); CommentsColorChanged?.Invoke(textView, CommentsForeground, CommentsBackground); }