Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (objGeneralDba == null)
            {
                objGeneralDba = new GeneralDba();
            }
            if (objCMDba == null)
            {
                objCMDba = new CMDba();
            }
            lblMachineName.Content = this.MachineCode;

            SetTriggerStatus(objGeneralDba.GetMachineTriggerStatus(this.MachineCode));
            SetEnableStatus(objCMDba.GetCMEnabledStatus(this.MachineCode));
            if (this.MachineCode.Contains("LCM"))
            {
                SetRotatoinStatusToView();
            }
            else
            {
                chkRotation.Visibility = Visibility.Hidden;
            }
        }
        void timerToUpdateStatus_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            // cmLock.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetLockedStatus), objCMDba.GetCMBlockedStatus(MachineCode));
            if (objCMDba == null)
            {
                objCMDba = new CMDba();
            }
            if (objGeneralDba == null)
            {
                objGeneralDba = new GeneralDba();
            }

            this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetLockedStatus), objCMDba.GetCMBlockedStatus(MachineCode));
            triggerStatus.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetTriggerStatus), objGeneralDba.GetMachineTriggerStatus(MachineCode));
            disableGrid.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetDisableStatus), !objCMDba.GetCMEnabledStatus(MachineCode));
            this.QueueId = objCMDba.GetCMQueueId(this.MachineCode);
            cardIdLabel.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegateForString(SetCardId), objGeneralDba.GetCardIdFromQueue(this.QueueId));
        }
        void timerToUpdateStatus_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            this.Dispatcher.BeginInvoke(DispatcherPriority.Background, new InvokeDelegate(SetLockedStatus), objVLCDba.GetVLCBlockedStatus(MachineCode));
            triggerStatus.Dispatcher.BeginInvoke(DispatcherPriority.Background, new InvokeDelegate(SetTriggerStatus), objGeneralDba.GetMachineTriggerStatus(MachineCode));
            disableGrid.Dispatcher.BeginInvoke(DispatcherPriority.Background, new InvokeDelegate(SetDisableStatus), !objVLCDba.GetVLCEnabledStatus(MachineCode));

            this.QueueId = objVLCDba.GetVLCQueueId(this.MachineCode);
            cardIdLabel.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegateForString(SetCardId), objGeneralDba.GetCardIdFromQueue(this.QueueId));
        }
Exemplo n.º 5
0
 void timerToUpdateStatus_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     triggerStatus.Dispatcher.BeginInvoke(DispatcherPriority.Background, new InvokeDelegate(SetTriggerStatus), objGeneralDba.GetMachineTriggerStatus(MachineCode));
     disableGrid.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetDisableStatus), !objPSDba.GetPSEnabledStatus(MachineCode));
     switchOffRect.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(ShowSwitchOffStatus), objPSDba.GetPSSwitchOffStatus(this.MachineCode));
 }