public void GoBackPressDefault() { if (TimerMode == TimerModes.Off) { return; } if (!GoBackDefaultEnabled) { return; } windowHistory.Last().Dispatcher.Invoke(() => SetIsHighlight(currentScanObject, false)); if (TimerMode == TimerModes.Paused || TimerMode == TimerModes.Manual) { TimerMode = TimerModes.On; NewListToScanThough(ReturnPointList.Peek()); popReturnPointList = true; return; } if (popReturnPointList == true) { if (MainWindow.Instance.Navigator.CanGoBack || ReturnPointList.Count > 1) { _ = ReturnPointList.Pop(); } if (ReturnPointList.Count > 0) // Path on page not Empty { NewListToScanThough(ReturnPointList.Peek()); popReturnPointList = true; } else //Cant go any further Back on CurrentPage { switch (windowHistory.Last()) { case MainWindow mw: MainWindow.Instance.Back(); break; case SecondaryWindow sw: //CloseActiveWindow(); sw.Close(); break; } } } else { NewListToScanThough(ReturnPointList.Peek()); popReturnPointList = true; } }
public void SelectPressDefault() { if (TimerMode == TimerModes.Off) { return; } if (!SelectDefaultEnabled) { return; } switch (currentScanObject) { case Panel panel: //App.Current.Dispatcher.Invoke(() => SetIsHighlight(panel, false)); NewListToScanThough <DependencyObject>(panel); //pass in panel that was clicked break; case ScrollViewer scrollViewer: NewListToScanThough <DependencyObject>( scrollViewer.Content as Panel); //pass in panel that was clicked break; case SysButton button: if (button is TalkerButton.Button btn && btn.PauseOnSelect) { scanTimer.Stop(); TimerMode = TimerModes.Paused; btn?.RaiseEvent(new RoutedEventArgs( System.Windows.Controls.Primitives.ButtonBase .ClickEvent)); // how you simulate a button click in code } else { button?.RaiseEvent(new RoutedEventArgs( System.Windows.Controls.Primitives.ButtonBase .ClickEvent)); // how you simulate a button click in code //NewListToScanThough<DependencyObject>(goBackPath.Pop()); //pass in panel that was clicked if (ReturnPointList.Count > 0) { NewListToScanThough(ReturnPointList.Peek()); popReturnPointList = true; } scanTimer.Start(); } break; }
public static PO GetReturnPoint(PO entity) { if (entity.PM_ReturnPointSysNo != null) { if (Convert.ToInt32(entity.PM_ReturnPointSysNo) > 0) { ReturnPointList returnPoint = GetReturnPointNameBySysNo(Convert.ToInt32(entity.PM_ReturnPointSysNo)); if (returnPoint != null) { entity.ReturnPointName = returnPoint.ReturnPointName; entity.RemnantReturnPoint = returnPoint.RemnantReturnPoint.ToString("#########0.00"); } } else { entity.PM_ReturnPointSysNo = 0; } } return(entity); }