示例#1
0
 private void OnFormatItemsChanged(object sender, FormatItemsEventArgs args)
 {
     if (args.ChangedItems.Any(i => i == "Comment"))
     {
         ReloadColors();
         CommentsColorChanged?.Invoke(textView, CommentsForeground, CommentsBackground);
     }
 }
示例#2
0
        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;
            }
        }
示例#3
0
 private void OnBackgroundBrushChanged(object sender, BackgroundBrushChangedEventArgs args)
 {
     ReloadColors();
     CommentsColorChanged?.Invoke(textView, CommentsForeground, CommentsBackground);
 }