private void FrmRealtimeMultiThread_Load(object sender, EventArgs e) { // Initialize the WinChartViewer initChartViewer(winChartViewer1); // Start the random data generator dataSource = new RandomWalk(onData); dataSource.start(); // Now can start the timers for data collection and chart update chartUpdateTimer.Interval = 100; chartUpdateTimer.Start(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { // Initialize the WPFChartViewer initChartViewer(WPFChartViewer1); // Start the random data generator dataSource = new RandomWalk(onData); dataSource.start(); // Now can start the timers for data collection and chart update var chartUpdateTimer = new DispatcherTimer(DispatcherPriority.Render); chartUpdateTimer.Tick += chartUpdateTimer_Tick; chartUpdateTimer.Interval = new TimeSpan(0, 0, 0, 0, 100); chartUpdateTimer.Start(); }