private void Window_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } if (objPSTDba == null) { objPSTDba = new PSTDba(); } lblMachineName.Content = this.MachineCode; SetTriggerStatus(objGeneralDba.GetMachineTriggerStatus(this.MachineCode)); SetEnableStatus(objPSTDba.GetPSTEnabledStatus(this.MachineCode)); }
void timerToUpdateStatus_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { disableGrid.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new DisableInvokeDelegate(SetDisableStatus), !objPSTDba.GetPSTEnabledStatus(MachineCode)); }