Пример #1
0
        private void CheckSyntaxAndReport()
        {
            this.Dispatcher.Invoke(new Action(() =>
            {
                _barCode = tbBarCode.Text.Trim();
            }
                                              ));
            if (!string.IsNullOrEmpty(_barCode) && _barCode.Length >= 36)
            {
                _barCode = _barCode.Substring(_barCode.Length - 36, 36);

                Debug.Log("CashmaticApp", "CheckSyntaxAndReport");

                RootObject ob = TransactionLogic.RequestParkingDetails(_barCode);
                if (ob != null && !ob.isError)
                {
                    ob.panda.language = _language;
                    Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background,
                                                               new Action(() => Application.Current.MainWindow.Content = new PaymentSummaryPage(ob)));
                }
            }
            else
            {
                Debug.Log("CashmaticApp", "incorrect hash" + _barCode);
            }

            this.Dispatcher.Invoke(new Action(() =>
            {
                tbBarCode.Text = "";
            }
                                              ));
            _barCode = "";
        }