Example #1
0
        private void PrintReceipt()
        {
            lock (lockObject)
            {
                CommunicationResult result = new CommunicationResult();

                ReceiptInformationManager receiptInfo = SharedInformationManager.ReceiptInformationManager;

                ProgressBarWindow progressBarWindow = new ProgressBarWindow("Communicating...", () =>
                {
                    byte[] commands = AllReceiptsSampleManager.CreateLocalizeReceiptWithAllReceiptsCommands(receiptInfo);

                    if (commands == null) // All print settings (Receipt, Information, QR Code) are OFF.
                    {
                        result.Result = Communication.Result.Success;
                        result.Code   = StarResultCode.Succeeded;

                        return;
                    }

                    result = Communication.SendCommands(commands, port);
                });

                progressBarWindow.ShowDialog();

                Communication.ShowCommunicationResultMessage(result);
            }
        }
Example #2
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            AllReceiptsSampleManager.AddAllReceiptsFunctionEvent();

            ConnectWithProgressBar();

            PrintReceipt();
        }
        public override void Execute(object parameter)
        {
            MessageBoxResult result = MessageBox.Show("Delete AllReceipts config file?", "Confirm", MessageBoxButton.OKCancel);

            if (result == MessageBoxResult.OK)
            {
                AllReceiptsSampleManager.DeleteRegistrationConfigFile();
            }
        }
        public override void Execute(object parameter)
        {
            bool isDelete = ShowDeleteConfigFileConfirmWindow();

            if (isDelete)
            {
                AllReceiptsSampleManager.DeleteRegistrationConfigFile();
            }
        }
Example #5
0
        private void Page_Unloaded(object sender, RoutedEventArgs e)
        {
            AllReceiptsSampleManager.RemoveAllReceiptsFunctionEvent();

            DisconnectWithProgressBar();
        }
 public override void Execute(object parameter)
 {
     AllReceiptsSampleManager.PrintLocalizeReceiptWithAllReceipts(ReceiptInformationManager);
 }
 public override void Execute(object parameter)
 {
     AllReceiptsSampleManager.ShowAllReceiptsRegistrationView();
 }
 private void Page_Unloaded(object sender, RoutedEventArgs e)
 {
     AllReceiptsSampleManager.RemoveAllReceiptsFunctionEvent();
 }