private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     if (objGeneralDba == null)
     {
         objGeneralDba = new GeneralDba();
     }
     if (objPVLDba == null)
     {
         objPVLDba = new PVLDba();
     }
     lblMachineName.Content = this.MachineCode;
     SetTriggerStatus(objGeneralDba.GetMachineTriggerStatus(this.MachineCode));
     SetEnableStatus(objPVLDba.GetPVLEnabledStatus(this.MachineCode));
 }
 void timerToUpdateStatus_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     triggerStatus.Dispatcher.BeginInvoke(DispatcherPriority.Background, new InvokeDelegate(SetTriggerStatus), objGeneralDba.GetMachineTriggerStatus(MachineCode));
     disableGrid.Dispatcher.BeginInvoke(DispatcherPriority.Background, new InvokeDelegate(SetDisableStatus), !objPVLDba.GetPVLEnabledStatus(MachineCode));
 }