private void Run(object sender, DoWorkEventArgs e) { Log.Info("Started"); while (!backroundWorker.CancellationPending) { try { SensorsDataViewModel.GetSensorsDataViewModel().Update(BackgroundJobClient.GetMeasuredData()); OverviewDataViewModel.GetOverviewDataViewModel().Update(BackgroundJobClient.GetOverviewData()); } catch (Exception ex) { Log.Error("Error", ex); } Thread.Sleep(15000); } if (backroundWorker.CancellationPending) { e.Cancel = true; } Log.Info("Stopped"); }
public BasicPage() { this.InitializeComponent(); ViewModel = OverviewDataViewModel.GetOverviewDataViewModel(); }