Ejemplo n.º 1
0
 public PrintReciptPage(string NumberOfTicket, string ReceivedAmt, string ChangeAmt)
 {
     InitializeComponent();
     try
     {
         LedOperations.GreenText("PAYMENT SUCCESSFUL");
         RecAmt = ReceivedAmt;
         ChaAmt = ChangeAmt;
         returnCashImageGif.Source = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"\Images\giving_money.gif");
         lblTicketCount.Content    = NumberOfTicket;
         lblChange.Content         = ChangeAmt;
         if (!Constants.NoReceiptMode)
         {
             stkPrint.Visibility  = Visibility.Visible;
             btnFinish.Visibility = Visibility.Collapsed;
             Message();
         }
         else
         {
             stkPrint.Visibility  = Visibility.Collapsed;
             btnFinish.Visibility = Visibility.Visible;
         }
     }
     catch (Exception ex)
     {
         log.Debug("Error PrintReciptPage -> PrintReciptPage() : " + ex.ToString());
     }
 }
Ejemplo n.º 2
0
        async void PrintQR()
        {
            try
            {
                LedOperations.GreenText("PLEASE COLLECT TICKET");
                LastMessage();
                await Task.Delay(100);

                NavigationService.Navigate(new Pages.MainPage());
            }
            catch (Exception ex)
            {
                log.Error("Error PrintReciptPage -> PrintQR() : " + ex.ToString());
            }
        }
Ejemplo n.º 3
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                Constants.IsMaintenanceActive = false;

                LedOperations.Close();

                checkDeviceTimerDelegate = new TimerCallback(CheckDeviceAction);
                checkDeviceTimer         = new Timer(checkDeviceTimerDelegate, null, 1000, Constants.CheckDeviceTime);
            }
            catch (Exception ex)
            {
                log.Error("Error StationClosedPage -> Page_Loaded() : " + ex.ToString());
            }
        }
Ejemplo n.º 4
0
 private void AsyncIntFunc()
 {
     try
     {
         Dispatcher.Invoke(DispatcherPriority.Background, new Action(async() =>
         {
             LedOperations.Close();
             await Task.Delay(1000);
             InitializeBNR();
         }));
     }
     catch (Exception ex)
     {
         log.Error("Error OutOfServicePage -> asyncFunc() :" + ex.ToString());
     }
 }
Ejemplo n.º 5
0
 public JourneyTypePage()
 {
     InitializeComponent();
     try
     {
         initialTimer();
         if (Ticket.language == Languages.English || Ticket.language == Languages.Hint)
         {
             lblDestination.FontSize = 14;
             lblNoOfTickets.FontSize = 14;
             lblAmount.FontSize      = 14;
         }
         else
         {
             lblDestination.FontSize = 12;
             lblNoOfTickets.FontSize = 12;
             lblAmount.FontSize      = 12;
         }
         btnBack.Content        = MultiLanguage.GetText("back");
         btnFinish.Content      = MultiLanguage.GetText("cancel");
         labelSJT.Content       = MultiLanguage.GetText("sj");
         lblRJT.Content         = MultiLanguage.GetText("rj");
         lblGroup.Content       = MultiLanguage.GetText("gj");
         lblOneDayPass.Content  = MultiLanguage.GetText("onedaypass");
         lblWeekendPass.Content = MultiLanguage.GetText("weekenddaypass");
         lblHeader.Content      = MultiLanguage.GetText("selectTicketType");
         lblType.Content        = MultiLanguage.GetText("DispTicketType");
         lblDestination.Content = MultiLanguage.GetText("DispDestination");
         lblNoOfTickets.Content = MultiLanguage.GetText("DispNoOfTickets");
         lblAmount.Content      = MultiLanguage.GetText("DispAmount");
         //lblGroup.Content
         Message();
         LedOperations.GreenText("SELECT TICKET TYPE");
     }
     catch (Exception ex)
     {
         log.Error("Error JourneyTypePage -> JourneyTypePage() : " + ex.ToString());
     }
 }
Ejemplo n.º 6
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                initialTimer();
                LedOperations.GreenText("Select Destination");
                Message();
                btnBack.Content        = MultiLanguage.GetText("back");
                btnFinish.Content      = MultiLanguage.GetText("cancel");
                btnStationList.Content = MultiLanguage.GetText("showStationList");
                lblDestination.Content = MultiLanguage.GetText("DispDestination");
                lblNoOfTickets.Content = MultiLanguage.GetText("DispNoOfTickets");
                lblAmount.Content      = MultiLanguage.GetText("DispAmount");
                SetHeaderText();
                SetDefaultStatus();
                ListStationsInGrid();
                switch (Ticket.journeyType)
                {
                case JourneyType.SJT:
                    lblType.Content = MultiLanguage.GetText("SJT");
                    break;

                case JourneyType.RJT:
                    lblType.Content = MultiLanguage.GetText("RJT");
                    break;

                case JourneyType.Group_Ticket:
                    lblType.Content = MultiLanguage.GetText("GRO");
                    break;

                case JourneyType.Day_Pass:
                    lblType.Content = MultiLanguage.GetText("onedaypass");
                    break;

                case JourneyType.Weekend_Pass:
                    lblType.Content = MultiLanguage.GetText("weekenddaypass");
                    break;
                }
                btnStation1.Content  = MultiLanguage.GetText(Stations.GetStation(1).description);
                btnStation2.Content  = MultiLanguage.GetText(Stations.GetStation(2).description);
                btnStation3.Content  = MultiLanguage.GetText(Stations.GetStation(3).description);
                btnStation4.Content  = MultiLanguage.GetText(Stations.GetStation(4).description);
                btnStation5.Content  = MultiLanguage.GetText(Stations.GetStation(5).description);
                btnStation6.Content  = MultiLanguage.GetText(Stations.GetStation(6).description);
                btnStation7.Content  = MultiLanguage.GetText(Stations.GetStation(7).description);
                btnStation8.Content  = MultiLanguage.GetText(Stations.GetStation(8).description);
                btnStation9.Content  = MultiLanguage.GetText(Stations.GetStation(9).description);
                btnStation10.Content = MultiLanguage.GetText(Stations.GetStation(10).description);
                btnStation11.Content = MultiLanguage.GetText(Stations.GetStation(11).description);
                btnStation12.Content = MultiLanguage.GetText(Stations.GetStation(12).description);
                btnStation13.Content = MultiLanguage.GetText(Stations.GetStation(13).description);
                btnStation14.Content = MultiLanguage.GetText(Stations.GetStation(14).description);
                btnStation15.Content = MultiLanguage.GetText(Stations.GetStation(15).description);
                btnStation16.Content = MultiLanguage.GetText(Stations.GetStation(16).description);
                btnStation17.Content = MultiLanguage.GetText(Stations.GetStation(17).description);
                btnStation18.Content = MultiLanguage.GetText(Stations.GetStation(18).description);
                btnStation19.Content = MultiLanguage.GetText(Stations.GetStation(19).description);
                btnStation20.Content = MultiLanguage.GetText(Stations.GetStation(20).description);
                btnStation21.Content = MultiLanguage.GetText(Stations.GetStation(21).description);
                btnStation22.Content = MultiLanguage.GetText(Stations.GetStation(22).description);
            }
            catch (Exception ex)
            {
                log.Error("Error StationMapPage -> Page_Loaded() : " + ex.ToString());
            }
        }
Ejemplo n.º 7
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                initialTimer();
                LedOperations.GreenText("PAY USING CASH");
                lblInfo.Content   = MultiLanguage.GetText("startPaymentProc");
                btnBack.Content   = MultiLanguage.GetText("back");
                btnFinish.Content = MultiLanguage.GetText("cancel");
                btnCash.Content   = MultiLanguage.GetText("cash");
                PRINTER_STATE ReceiptPrinter = CustomTL60Printer.Instance.getStatusWithUsb();
                if (ReceiptPrinter == PRINTER_STATE.OK)
                {
                    Constants.NoReceiptMode = false;
                }
                else
                {
                    Constants.NoReceiptMode = true;
                }

                var result = Parameters.TVMDynamic.GetAfcConnStatus();
                if (!result)
                {
                    ElectronicJournal.OrderCancelled();
                    Custom.MessageBoxResult messageBoxResult = MessageBoxOperations.ShowMessage("Communication", "LAN communication Error.", MessageBoxButtonSet.OK);
                    if (messageBoxResult == Custom.MessageBoxResult.OK)
                    {
                        NavigationService.Navigate(new Pages.MainPage());
                    }
                    return;
                }

                PRINTER_STATE QRStatus = QRPrinter.Instance.CheckQrPrinterStatus();//CustomKPM150HPrinter.Instance.getStatusWithUsb();
                if (QRStatus != PRINTER_STATE.OK)
                {
                    ElectronicJournal.OrderCancelled();
                    Custom.MessageBoxResult messageBoxResult = MessageBoxOperations.ShowMessage("QR Printer", "QR Printer Error.", MessageBoxButtonSet.OK);
                    if (messageBoxResult == Custom.MessageBoxResult.OK)
                    {
                        NavigationService.Navigate(new Pages.MainPage());
                    }
                    return;
                }
                else
                {
                    if (StockOperations.qrSlip > Ticket.ticketCount || StockOperations.qrSlip > Ticket.peopleCount)
                    {
                        Dispatcher.BeginInvoke(new Action(() =>
                        {
                            try
                            {
                                if (Ticket.PrepareTicket())
                                {
                                    DefaultTicketInfo();
                                    ArrangTicketInfo();
                                    btnCash.Visibility = Visibility.Visible;
                                    Message();
                                }
                            }
                            catch (Exception ex)
                            {
                            }
                        }), DispatcherPriority.Background);
                    }
                    else
                    {
                        ElectronicJournal.OrderCancelled();
                        Custom.MessageBoxResult messageBoxResult = MessageBoxOperations.ShowMessage("QR Printer", "QR Printer Paper Less.", MessageBoxButtonSet.OK);
                        if (messageBoxResult == Custom.MessageBoxResult.OK)
                        {
                            NavigationService.Navigate(new Pages.MainPage());
                        }
                        return;
                    }
                }
                BNRManager.Instance.PollingAction();
            }
            catch (Exception ex)
            {
                log.Error("Error OrderPreviewPage -> Page_Loaded() : " + ex.ToString());
            }
        }
Ejemplo n.º 8
0
 private void Page_Loaded(object sender, RoutedEventArgs e)
 {
     LedOperations.Maintance();
 }
Ejemplo n.º 9
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                initialTimer();
                LedOperations.GreenText("Select Destination");
                if (Ticket.language == Languages.English || Ticket.language == Languages.Hint)
                {
                    lblHeader.FontSize      = 22;
                    lblDestination.FontSize = 14;
                    lblNoOfTickets.FontSize = 14;
                    lblAmount.FontSize      = 14;
                }
                else
                {
                    lblHeader.FontSize      = 18;
                    lblDestination.FontSize = 12;
                    lblNoOfTickets.FontSize = 12;
                    lblAmount.FontSize      = 12;
                }
                Message();
                btnBack.Content        = MultiLanguage.GetText("back");
                btnFinish.Content      = MultiLanguage.GetText("cancel");
                btnStationMap.Content  = MultiLanguage.GetText("showStationMap");
                lblDestination.Content = MultiLanguage.GetText("DispDestination");
                lblNoOfTickets.Content = MultiLanguage.GetText("DispNoOfTickets");
                lblAmount.Content      = MultiLanguage.GetText("DispAmount");
                Dictionary <int, Station> stations = Stations.stationList;
                switch (Ticket.journeyType)
                {
                case JourneyType.SJT:
                    lblType.Content = MultiLanguage.GetText("SJT");
                    break;

                case JourneyType.RJT:
                    lblType.Content = MultiLanguage.GetText("RJT");
                    break;

                case JourneyType.Group_Ticket:
                    lblType.Content = MultiLanguage.GetText("GRO");
                    break;

                case JourneyType.Day_Pass:
                    lblType.Content = MultiLanguage.GetText("onedaypass");
                    break;

                case JourneyType.Weekend_Pass:
                    lblType.Content = MultiLanguage.GetText("weekenddaypass");
                    break;
                }
                SetHeaderText();
                bool isOk = CreateGridStations();
                if (isOk)
                {
                    ListStationsInGrid();
                }
            }
            catch (Exception ex)
            {
                log.Error("Error StationPage -> Page_Loaded() : " + ex.ToString());
            }
        }