Exemple #1
0
        public InheritanceGlyphMouseHandler(InheritanceGlyphMouseHandlerProvider provider, IWpfTextViewHost textViewHost, IWpfTextViewMargin margin)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }
            if (textViewHost == null)
            {
                throw new ArgumentNullException("textViewHost");
            }
            if (margin == null)
            {
                throw new ArgumentNullException("margin");
            }

            _provider           = provider;
            _textViewHost       = textViewHost;
            _margin             = margin;
            _glyphTagAggregator = provider.ViewTagAggregatorFactoryService.CreateTagAggregator <IInheritanceTag>(textViewHost.TextView);
            _popup = new Popup()
            {
                IsOpen     = false,
                Visibility = Visibility.Hidden
            };

            _lastLeftButtonWasDoubleClick = true;
            _textViewHost.Closed         += (sender, e) => _glyphTagAggregator.Dispose();
        }
        public InheritanceGlyphMouseHandler(InheritanceGlyphMouseHandlerProvider provider, IWpfTextViewHost textViewHost, IWpfTextViewMargin margin)
        {
            if (provider == null)
                throw new ArgumentNullException("provider");
            if (textViewHost == null)
                throw new ArgumentNullException("textViewHost");
            if (margin == null)
                throw new ArgumentNullException("margin");

            _provider = provider;
            _textViewHost = textViewHost;
            _margin = margin;
            _glyphTagAggregator = provider.ViewTagAggregatorFactoryService.CreateTagAggregator<IInheritanceTag>(textViewHost.TextView);
            _popup = new Popup()
                {
                    IsOpen = false,
                    Visibility = Visibility.Hidden
                };

            _lastLeftButtonWasDoubleClick = true;
            _textViewHost.Closed += (sender, e) => _glyphTagAggregator.Dispose();
        }