Example #1
0
        private void LabelNameService1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Alt & e.KeyCode == Keys.F4)
            {
                data.stage = WorkerStateStage.ExitProgram;
            }
            else if (e.Alt & e.KeyCode == Keys.F5)
            {
                if (Globals.IsDebug)
                {
                    // в дебаге - вносим деньги руками
                    Drivers.Message message = new Drivers.Message();

                    message.Content = new BillNominal();

                    ((BillNominal)message.Content).nominalNumber = 3;
                    ((BillNominal)message.Content).Denomination  = "500";

                    ServiceClientResponseEventArgs e1 = new ServiceClientResponseEventArgs(message);

                    CreditMoney(e1);
                }
            }
            else if (e.Alt & e.KeyCode == Keys.F6)
            {
                if (Globals.IsDebug)
                {
                    // в дебаге - вносим деньги руками
                    Drivers.Message message = new Drivers.Message();

                    message.Content = new BillNominal();

                    ((BillNominal)message.Content).nominalNumber = 3;
                    ((BillNominal)message.Content).Denomination  = "50";

                    ServiceClientResponseEventArgs e1 = new ServiceClientResponseEventArgs(message);

                    CreditMoney(e1);
                }
            }
            else if (e.Alt & e.KeyCode == Keys.F7)
            {
                if (Globals.IsDebug)
                {
                    // в дебаге - вносим деньги руками
                    Drivers.Message message = new Drivers.Message();

                    message.Content = "0000000000";

                    ServiceClientResponseEventArgs e1 = new ServiceClientResponseEventArgs(message);

                    CreditCheck(e1);
                }
            }
        }
Example #2
0
        private void FormWaitPayCheck_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Alt & e.KeyCode == Keys.F4)
            {
                data.stage = WorkerStateStage.ExitProgram;
                this.Close();
            }
            else if (e.Alt & e.KeyCode == Keys.F5)
            {
                if (Globals.IsDebug)
                {
                    // в дебаге - вносим деньги руками
                    Drivers.Message message = new Drivers.Message();

                    message.Content = "834141186725";

                    ServiceClientResponseEventArgs e1 = new ServiceClientResponseEventArgs(message);

                    CreditMoney(e1);
                }
            }
            else if (e.Alt & e.KeyCode == Keys.F6)
            {
                if (Globals.IsDebug)
                {
                    // в дебаге - вносим деньги руками
                    Drivers.Message message = new Drivers.Message();

                    message.Content = "047759717704";

                    ServiceClientResponseEventArgs e1 = new ServiceClientResponseEventArgs(message);

                    CreditMoney(e1);
                }
            }
            else if (e.Alt & e.KeyCode == Keys.F7)
            {
                if (Globals.IsDebug)
                {
                    // в дебаге - вносим деньги руками
                    Drivers.Message message = new Drivers.Message();

                    message.Content = "0000000000";

                    ServiceClientResponseEventArgs e1 = new ServiceClientResponseEventArgs(message);

                    CreditMoney(e1);
                }
            }
        }
Example #3
0
        private void FormMainMenu_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Alt & e.KeyCode == Keys.F4)
            {
                data.stage = WorkerStateStage.ExitProgram;
            }
            else if (e.Alt & e.KeyCode == Keys.F5)
            {
                if (Globals.IsDebug)
                {
                    // пошлем событие вынимания приемника
                    Drivers.Message message = new Drivers.Message();

                    message.Event   = DeviceEvent.DropCassetteBillAcceptor;
                    message.Content = "Drop bill";

                    ServiceClientResponseEventArgs e1 = new ServiceClientResponseEventArgs(message);

                    reciveResponse(null, e1);
                }
            }
        }
Example #4
0
        private void scalableLabel2_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Alt & e.KeyCode == Keys.F4)
            {
                data.stage = WorkerStateStage.ExitProgram;
                Close();
            }
            else if (e.Alt & e.KeyCode == Keys.F5)
            {
                if (Globals.IsDebug)
                {
                    // пошлем событие вставки обратно приемника
                    Drivers.Message message = new Drivers.Message();

                    message.Event   = DeviceEvent.InitializationOK;
                    message.Content = "Insert bill";

                    ServiceClientResponseEventArgs e1 = new ServiceClientResponseEventArgs(message);

                    reciveResponse(null, e1);
                }
            }
        }