示例#1
0
        public MainPage()
        {
            SetUpPageAnimation();
            this.InitializeComponent();

            Unloaded += MainPage_Unloaded;
            Loaded   += MainPage_Loaded;

            // Initialize the Sensors
            ViewModel = SensorsDataViewModel.GetSensorsDataViewModel();
        }
示例#2
0
 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");
 }