Exemplo n.º 1
0
#pragma warning restore CS0169

        public ColumnLineSeparatorService(WpfHexView wpfHexView, HexEditorFormatMapService editorFormatMapService)
        {
            if (editorFormatMapService == null)
            {
                throw new ArgumentNullException(nameof(editorFormatMapService));
            }
            lineElements       = new List <LineElement>();
            this.wpfHexView    = wpfHexView ?? throw new ArgumentNullException(nameof(wpfHexView));
            editorFormatMap    = editorFormatMapService.GetEditorFormatMap(wpfHexView);
            wpfHexView.Closed += WpfHexView_Closed;
            wpfHexView.Options.OptionChanged += Options_OptionChanged;
            UpdateEnabled();
        }
Exemplo n.º 2
0
#pragma warning restore 0169

        public ActiveColumnHighlighterService(WpfHexView wpfHexView, HexEditorFormatMapService editorFormatMapService)
        {
            if (editorFormatMapService == null)
            {
                throw new ArgumentNullException(nameof(editorFormatMapService));
            }
            rectangleElements  = new List <RectangleElement>();
            this.wpfHexView    = wpfHexView ?? throw new ArgumentNullException(nameof(wpfHexView));
            editorFormatMap    = editorFormatMapService.GetEditorFormatMap(wpfHexView);
            wpfHexView.Closed += WpfHexView_Closed;
            wpfHexView.Options.OptionChanged += Options_OptionChanged;
            UpdateEnabled();
        }
Exemplo n.º 3
0
 void Initialize()
 {
     if (mouseProcessorCollection != null)
     {
         return;
     }
     iconCanvas = new Canvas {
         Background = Brushes.Transparent
     };
     canvas.Children.Add(iconCanvas);
     mouseProcessorCollection = new HexMouseProcessorCollection(VisualElement, null, new DefaultHexMouseProcessor(), CreateMouseProcessors(), null);
     lineInfos       = new Dictionary <object, LineInfo>();
     tagAggregator   = viewTagAggregatorFactoryService.CreateTagAggregator <HexGlyphTag>(wpfHexViewHost.HexView);
     editorFormatMap = editorFormatMapService.GetEditorFormatMap(wpfHexViewHost.HexView);
     InitializeGlyphFactories();
 }
Exemplo n.º 4
0
 public override void HexViewCreated(WpfHexView hexView) =>
 new HexMarkerService(hexView, viewTagAggregatorFactoryService.CreateTagAggregator <HexMarkerTag>(hexView), editorFormatMapService.GetEditorFormatMap(hexView));
Exemplo n.º 5
0
 public override void HexViewCreated(WpfHexView hexView) =>
 hexView.Properties.GetOrCreateSingletonProperty(() => new CurrentLineHighlighter(hexView, editorFormatMapService.GetEditorFormatMap(hexView)));