private void UserControl_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { if (objCMDba == null) { objCMDba = new CMDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } bool isBlocked = false; int requestType = -1; isBlocked = objCMDba.GetCMBlockedStatus(this.MachineCode); this.QueueId = objCMDba.GetCMQueueId(this.MachineCode); requestType = this.QueueId != 0 ? objGeneralDba.GetRequestType(this.QueueId) : -1; if (isBlocked && QueueId != 0 && (requestType == 1 || requestType == 0 || requestType == 5 || requestType == 6 || requestType == 3)) //entry or exit { ReallocatePop objReallocatePop = null; objReallocatePop = new ReallocatePop(); objReallocatePop.MachineCode = this.MachineCode; objReallocatePop.MachineChannel = this.MachineChannel; objReallocatePop.QueueId = this.QueueId; objReallocatePop.Show(); } }
private void chkStatus_Checked(object sender, RoutedEventArgs e) { RadioButton radio = sender as RadioButton; if (objCMDba == null) { objCMDba = new CMDba(); } int newMode = 0; if (radio.Name.Equals(chkMix.Name)) { newMode = 0; } else if (radio.Name.Equals(chkEntry.Name)) { newMode = 1; } else if (radio.Name.Equals(chkExit.Name)) { newMode = 2; } if (newMode == MachineMode) { return; } objCMDba.SetCMMode(this.MachineCode, newMode); this.Close(); }
public CMModeControl() { if (objCMDba == null) { objCMDba = new CMDba(); } InitializeComponent(); }
private void chkRotation_Unchecked(object sender, RoutedEventArgs e) { if (objCMDba == null) { objCMDba = new CMDba(); } objCMDba.SetCMRotationStatus(this.MachineCode, false); SetRotatoinStatusToView(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (objCMDba == null) { objCMDba = new CMDba(); } lblMachineName.Content = "LCM" + this.MachineCode[this.MachineCode.Length - 1]; SetCMMode(MachineMode); }
private void UserControl_Unloaded(object sender, RoutedEventArgs e) { if (bgGrp1 != null) { bgGrp1.Dispose(); bgGrp1 = null; } timerToUpdateStatus.Stop(); timerToUpdateStatus.Dispose(); objCMDba = null; objGeneralDba = null; }
private void chkStatus_Checked(object sender, RoutedEventArgs e) { RadioButton radio = sender as RadioButton; if (objCMDba == null) { objCMDba = new CMDba(); } if (radio.Name.Equals(chkEnable.Name)) { objCMDba.SetCMEnabledStatus(this.MachineCode, true); } else if (radio.Name.Equals(chkDisable.Name)) { objCMDba.SetCMEnabledStatus(this.MachineCode, false); } }
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)); }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objCMDba == null) { objCMDba = new CMDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } AsynchReadSettingsForCM(); SetRotationStatus(false); this.timerToUpdateStatus = new System.Timers.Timer(); this.timerToUpdateStatus.Enabled = true; this.timerToUpdateStatus.Interval = 3000; this.timerToUpdateStatus.Start(); this.timerToUpdateStatus.Elapsed += new System.Timers.ElapsedEventHandler(timerToUpdateStatus_Elapsed); }
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; } }