public MainWindow() { _settings = Settings.Default; _highlightingStyles = new Dictionary<string, HighlightingColor>(StringComparer.OrdinalIgnoreCase); ToolTipService.ShowDurationProperty.OverrideMetadata( typeof(DependencyObject), new FrameworkPropertyMetadata(Int32.MaxValue)); InitializeComponent(); _mainRow.Height = new GridLength(_settings.TabControlHeight); _configComboBox.ItemsSource = new[] {"Debug", "Release"}; var config = _settings.Config; _configComboBox.SelectedItem = config == "Release" ? "Release" : "Debug"; _tabControl.SelectedIndex = _settings.ActiveTabIndex; _foldingStrategy = new NitraFoldingStrategy(); _textBox1Tooltip = new ToolTip { PlacementTarget = _text }; _parseTimer = new Timer { AutoReset = false, Enabled = false, Interval = 300 }; _parseTimer.Elapsed += _parseTimer_Elapsed; _text.TextArea.Caret.PositionChanged += Caret_PositionChanged; _foldingManager = FoldingManager.Install(_text.TextArea); _textMarkerService = new TextMarkerService(_text.Document); _text.TextArea.TextView.BackgroundRenderers.Add(_textMarkerService); _text.TextArea.TextView.LineTransformers.Add(_textMarkerService); _text.Options.ConvertTabsToSpaces = true; _text.Options.EnableRectangularSelection = true; _text.Options.IndentationSize = 2; _testsTreeView.SelectedValuePath = "FullPath"; _propertyGrid = new PependentPropertyGrid(); _windowsFormsHost.Child = _propertyGrid; if (string.IsNullOrWhiteSpace(_settings.CurrentSolution)) _solution = null; else LoadTests(); }
public MainWindow() { _settings = Settings.Default; ToolTipService.ShowDurationProperty.OverrideMetadata( typeof(DependencyObject), new FrameworkPropertyMetadata(Int32.MaxValue)); InitializeComponent(); this.Top = _settings.WindowTop; this.Left = _settings.WindowLeft; this.Height = _settings.WindowHeight; this.Width = _settings.WindowLWidth; this.WindowState = (WindowState)_settings.WindowState; _mainRow.Height = new GridLength(_settings.TabControlHeight); _configComboBox.ItemsSource = new[] {"Debug", "Release"}; var config = _settings.Config; _configComboBox.SelectedItem = config == "Release" ? "Release" : "Debug"; _tabControl.SelectedIndex = _settings.ActiveTabIndex; _findGrid.Visibility = System.Windows.Visibility.Collapsed; _foldingStrategy = new NitraFoldingStrategy(); _textBox1Tooltip = new ToolTip { PlacementTarget = _text }; _parseTimer = new Timer { AutoReset = false, Enabled = false, Interval = 300 }; _parseTimer.Elapsed += _parseTimer_Elapsed; _text.TextArea.Caret.PositionChanged += Caret_PositionChanged; _highlightingStyles = new Dictionary<string, HighlightingColor> { { "Keyword", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Blue) } }, { "Comment", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Green) } }, { "Number", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Magenta) } }, { "Operator", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Navy) } }, { "String", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Maroon) } }, }; _foldingManager = FoldingManager.Install(_text.TextArea); _textMarkerService = new TextMarkerService(_text.Document); _text.TextArea.TextView.BackgroundRenderers.Add(_textMarkerService); _text.TextArea.TextView.LineTransformers.Add(_textMarkerService); _text.Options.ConvertTabsToSpaces = true; _text.Options.EnableRectangularSelection = true; _text.Options.IndentationSize = 2; _testsTreeView.SelectedValuePath = "FullPath"; LoadTests(); }
public MainWindow() { _settings = Settings.Default; ToolTipService.ShowDurationProperty.OverrideMetadata( typeof(DependencyObject), new FrameworkPropertyMetadata(Int32.MaxValue)); InitializeComponent(); this.Top = _settings.WindowTop; this.Left = _settings.WindowLeft; this.Height = _settings.WindowHeight; this.Width = _settings.WindowLWidth; this.WindowState = (WindowState)_settings.WindowState; _mainRow.Height = new GridLength(_settings.TabControlHeight); _configComboBox.ItemsSource = new[] { "Debug", "Release" }; var config = _settings.Config; _configComboBox.SelectedItem = config == "Release" ? "Release" : "Debug"; _tabControl.SelectedIndex = _settings.ActiveTabIndex; _foldingStrategy = new NitraFoldingStrategy(); _textBox1Tooltip = new ToolTip { PlacementTarget = _text }; _parseTimer = new Timer { AutoReset = false, Enabled = false, Interval = 300 }; _parseTimer.Elapsed += _parseTimer_Elapsed; _text.TextArea.Caret.PositionChanged += Caret_PositionChanged; _highlightingStyles = new Dictionary <string, HighlightingColor> { { "Keyword", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Blue) } }, { "Comment", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Green) } }, { "Number", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Magenta) } }, { "Operator", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Navy) } }, { "String", new HighlightingColor { Foreground = new SimpleHighlightingBrush(Colors.Maroon) } }, }; _foldingManager = FoldingManager.Install(_text.TextArea); _textMarkerService = new TextMarkerService(_text.Document); _text.TextArea.TextView.BackgroundRenderers.Add(_textMarkerService); _text.TextArea.TextView.LineTransformers.Add(_textMarkerService); _text.Options.ConvertTabsToSpaces = true; _text.Options.EnableRectangularSelection = true; _text.Options.IndentationSize = 2; _testsTreeView.SelectedValuePath = "FullPath"; if (string.IsNullOrWhiteSpace(_settings.CurrentSolution)) { _solution = null; } else { LoadTests(); } }