예제 #1
0
        public void TextViewCreated(IWpfTextView textView)
        {
            if (!_hasLoaded)
                LoadSettings();

            ITextDocument document;
            if (TextDocumentFactoryService.TryGetTextDocument(textView.TextDataModel.DocumentBuffer, out document))
            {
                string fileName = Path.GetFileName(document.FilePath).ToLowerInvariant();

                if (string.IsNullOrEmpty(fileName) || !_map.ContainsKey(fileName))
                    return;

                LogoAdornment highlighter = new LogoAdornment(textView, _map[fileName], _isVisible, _initOpacity);
            }
        }
예제 #2
0
        public void TextViewCreated(IWpfTextView textView)
        {
            if (!_hasLoaded)
            {
                LoadSettings();
            }

            ITextDocument document;

            if (TextDocumentFactoryService.TryGetTextDocument(textView.TextDataModel.DocumentBuffer, out document))
            {
                string fileName = Path.GetFileName(document.FilePath).ToLowerInvariant();

                if (string.IsNullOrEmpty(fileName) || !_map.ContainsKey(fileName))
                {
                    return;
                }

                LogoAdornment highlighter = new LogoAdornment(textView, _map[fileName], _isVisible, _initOpacity);
            }
        }