private void InitializeInternalState() { // Initialize text rendering TextUtils.StaticInitialize(); // Time bar display _timeBar = new TimeBar(TimeBarCanvas); // System Graphs display _systemPerformanceGraphs = new SystemPerformanceGraphsCanvas(SystemGraphsCanvas); //events this.Loaded += FASTBuildMonitorControl_Loaded; EventsScrollViewer.PreviewMouseWheel += MainWindow_MouseWheel; EventsScrollViewer.MouseWheel += MainWindow_MouseWheel; MouseWheel += MainWindow_MouseWheel; EventsCanvas.MouseWheel += MainWindow_MouseWheel; EventsScrollViewer.PreviewMouseLeftButtonDown += EventsScrollViewer_MouseDown; EventsScrollViewer.MouseDown += EventsScrollViewer_MouseDown; MouseDown += EventsScrollViewer_MouseDown; EventsCanvas.MouseDown += EventsScrollViewer_MouseDown; EventsScrollViewer.PreviewMouseLeftButtonUp += EventsScrollViewer_MouseUp; EventsScrollViewer.MouseUp += EventsScrollViewer_MouseUp; MouseUp += EventsScrollViewer_MouseUp; EventsCanvas.MouseUp += EventsScrollViewer_MouseUp; EventsScrollViewer.PreviewMouseDoubleClick += EventsScrollViewer_MouseDoubleClick; EventsScrollViewer.MouseDoubleClick += EventsScrollViewer_MouseDoubleClick; OutputTextBox.PreviewMouseDoubleClick += OutputTextBox_PreviewMouseDoubleClick; OutputTextBox.MouseDoubleClick += OutputTextBox_PreviewMouseDoubleClick; OutputTextBox.PreviewKeyDown += OutputTextBox_KeyDown; OutputTextBox.KeyDown += OutputTextBox_KeyDown; OutputTextBox.LayoutUpdated += OutputTextBox_LayoutUpdated; OutputWindowComboBox.SelectionChanged += OutputWindowComboBox_SelectionChanged; Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() => { //update timer _timer = new DispatcherTimer(); _timer.Tick += HandleTick; _timer.Interval = new TimeSpan(TimeSpan.TicksPerMillisecond * 16); _timer.Start(); })); }
private void InitializeInternalState() { // Font text if (_glyphTypeface == null) { Typeface typeface = new Typeface(new FontFamily("Segoe UI"), FontStyles.Normal, FontWeights.Normal, FontStretches.Normal); if (!typeface.TryGetGlyphTypeface(out _glyphTypeface)) { throw new InvalidOperationException("No glyphtypeface found"); } } // Time bar display _timeBar = new TimeBar(TimeBarCanvas); //events this.Loaded += FASTBuildMonitorControl_Loaded; EventsScrollViewer.PreviewMouseWheel += MainWindow_MouseWheel; EventsScrollViewer.MouseWheel += MainWindow_MouseWheel; MouseWheel += MainWindow_MouseWheel; EventsCanvas.MouseWheel += MainWindow_MouseWheel; EventsScrollViewer.PreviewMouseLeftButtonDown += EventsScrollViewer_MouseDown; EventsScrollViewer.MouseDown += EventsScrollViewer_MouseDown; MouseDown += EventsScrollViewer_MouseDown; EventsCanvas.MouseDown += EventsScrollViewer_MouseDown; EventsScrollViewer.PreviewMouseLeftButtonUp += EventsScrollViewer_MouseUp; EventsScrollViewer.MouseUp += EventsScrollViewer_MouseUp; MouseUp += EventsScrollViewer_MouseUp; EventsCanvas.MouseUp += EventsScrollViewer_MouseUp; EventsScrollViewer.PreviewMouseDoubleClick += EventsScrollViewer_MouseDoubleClick; EventsScrollViewer.MouseDoubleClick += EventsScrollViewer_MouseDoubleClick; OutputTextBox.PreviewMouseDoubleClick += OutputTextBox_PreviewMouseDoubleClick; OutputTextBox.MouseDoubleClick += OutputTextBox_PreviewMouseDoubleClick; OutputTextBox.PreviewKeyDown += OutputTextBox_KeyDown; OutputTextBox.KeyDown += OutputTextBox_KeyDown; OutputTextBox.LayoutUpdated += OutputTextBox_LayoutUpdated; OutputWindowComboBox.SelectionChanged += OutputWindowComboBox_SelectionChanged; Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() => { //update timer _timer = new DispatcherTimer(); _timer.Tick += HandleTick; _timer.Interval = new TimeSpan(TimeSpan.TicksPerMillisecond * 16); _timer.Start(); })); }