public void HighlightCurrentItem()
        {
            System.Windows.Threading.Dispatcher.CurrentDispatcher.VerifyAccess();

            HighlightHelper.HighlightCurrentItem(_window, CodeDocumentViewModel);

            // Force NotifyPropertyChanged
            CodeDocumentViewModel.CodeDocumentTop = null;
        }
Пример #2
0
        public void OnlyOneItemShouldBeHighlighted()
        {
            var document = SyntaxMapper.MapDocument(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..\\..\\Files\\TestProperties.cs"));

            HighlightHelper.HighlightCurrentItem(document, 13, Brushes.Red, Brushes.Blue, Brushes.Green, Brushes.White);

            HighlightHelper.HighlightCurrentItem(document, 18, Brushes.Red, Brushes.Blue, Brushes.Green, Brushes.White);


            var highlightedItems = new List <CodeItem>();

            FindHighlightedItems(highlightedItems, document);

            Assert.AreEqual(1, highlightedItems.Count);
        }
Пример #3
0
        public void CurrentItemShouldBeHighlighted()
        {
            var document = SyntaxMapper.MapDocument(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..\\..\\Files\\TestProperties.cs"));

            HighlightHelper.HighlightCurrentItem(document, 13, Brushes.Red, Brushes.Blue, Brushes.Green, Brushes.White);

            var highlightedClass = (document.First() as IMembers).Members.First() as CodeClassItem;
            var highlightedItem  = highlightedClass.Members[2];

            Assert.AreEqual(FontWeights.Bold, highlightedItem.FontWeight);
            Assert.AreEqual(Brushes.Red, highlightedItem.Foreground);
            Assert.AreEqual(Brushes.Blue, highlightedItem.HighlightBackground);

            Assert.AreEqual(Brushes.Green, highlightedClass.BorderBrush);
        }
Пример #4
0
 public void HighlightCurrentItem() => HighlightHelper.HighlightCurrentItem(_window, CodeDocumentViewModel);
Пример #5
0
 public void HighlightCurrentItem()
 {
     System.Windows.Threading.Dispatcher.CurrentDispatcher.VerifyAccess();
     HighlightHelper.HighlightCurrentItem(_window, CodeDocumentViewModel);
 }