private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                Constants.IsMaintenanceActive = false;

                LedOperations.Close();

                checkDeviceTimerDelegate = new TimerCallback(CheckDeviceAction);
                checkDeviceTimer         = new Timer(checkDeviceTimerDelegate, null, 1000, Constants.CheckDeviceTime);
            }
            catch (Exception ex)
            {
                log.Error("Error StationClosedPage -> Page_Loaded() : " + ex.ToString());
            }
        }
Exemplo n.º 2
0
 private void AsyncIntFunc()
 {
     try
     {
         Dispatcher.Invoke(DispatcherPriority.Background, new Action(async() =>
         {
             LedOperations.Close();
             await Task.Delay(1000);
             InitializeBNR();
         }));
     }
     catch (Exception ex)
     {
         log.Error("Error OutOfServicePage -> asyncFunc() :" + ex.ToString());
     }
 }