Exemple #1
0
        protected override void PreProcess()
        {
            try
            {
                lastKeyPressed = DateTime.Now;
                KeyMap.Load();
                Debugger.Instance().AppendLine("Started Display: " + DateTime.Now.ToLongTimeString());

                DisplayAdapter.Instance();
                DisplayAdapter.Both.Show(PosMessage.PLEASE_WAIT);
                Application.DoEvents();
                Debugger.Instance().AppendLine("Finished Display" + DateTime.Now.ToLongTimeString());

                if (PosConfiguration.Get("BarcodeComPort") != "")
                {
                    ConnectBarcode();
                }

                //Console.CancelKeyPress += new ConsoleCancelEventHandler(pos_OnClosed);

                CashRegister.Instance();
                CashRegister.Printer.DateTimeChanged += new EventHandler(Printer_DateTimeChanged);

                Debugger.Instance().AppendLine("Started BackgroundWorker: " + DateTime.Now.ToLongTimeString());
                Thread thread = new Thread(new ThreadStart(BackgroundWorker.Start));
                thread.Name         = "BackgroundWorker";
                thread.IsBackground = true;
                thread.Priority     = ThreadPriority.BelowNormal;
                thread.Start();
            }
            catch (UnauthorizedAccessException ex)
            {
                throw ex;
            }
        }
Exemple #2
0
 private void Awake()
 {
     _endPoint      = gameObject.transform.position;
     Global.IsAlive = true;
     KeyMap.Load();
     swipeDetector = GameManager.instance.swipeDetector;
     swipeDetector.onSwipeDetected += OnSwipeDetected;
 }