Esempio n. 1
0
        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));
            if (this.MachineCode.Contains("LCM"))
            {
                rotateGrid.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetRotationStatus), !objCMDba.GetCMRotationStatus(MachineCode));
            }
        }
Esempio n. 2
0
 void SetRotatoinStatusToView()
 {
     this.chkRotation.IsChecked = objCMDba.GetCMRotationStatus(this.MachineCode);
 }