예제 #1
0
        private void Btn_Reuse_Click(object sender, EventArgs e)
        {
            NumberEventArgs nea;

            Int32 number = 0;

            if (ReuseNumber.StartsWith("+"))
            {
                Int32.TryParse(ReuseNumber.Remove(0, 1), out number);
                nea = new NumberEventArgs(number, NumberEventArgs.Dir.Positive);
            }
            else if (ReuseNumber.StartsWith("-"))
            {
                Int32.TryParse(ReuseNumber.Remove(0, 1), out number);
                nea = new NumberEventArgs(number * -1, NumberEventArgs.Dir.Negative);
            }
            else
            {
                Int32.TryParse(ReuseNumber, out number);
                nea = new NumberEventArgs(number, NumberEventArgs.Dir.Set);
            }

            EventHandler <NumberEventArgs> Handler = OnOk;

            if (null != Handler)
            {
                Handler(this, nea);
            }
        }
예제 #2
0
 public void InvokeOnBurst(object a_sender, Vector3EventArgs a_1vector3EventArgs, NumberEventArgs a_2numberEventArgs)
 {
     if (OnBurst != null)
     {
         OnBurst.Invoke(a_sender, a_1vector3EventArgs, a_2numberEventArgs);
     }
 }
예제 #3
0
        private void BtnCancel_Click(object sender, EventArgs e)
        {
            UpdateNumber();

            string          s = StringNumber.ToString();
            NumberEventArgs nea;

            if (s.StartsWith("+"))
            {
                nea = new NumberEventArgs(Int32.Parse(StringNumber.ToString()), NumberEventArgs.Dir.Positive);
            }
            else if (s.StartsWith("-"))
            {
                nea = new NumberEventArgs(Int32.Parse(StringNumber.ToString()), NumberEventArgs.Dir.Negative);
            }
            else
            {
                nea = new NumberEventArgs(Int32.Parse(StringNumber.ToString()), NumberEventArgs.Dir.Set);
            }

            EventHandler <NumberEventArgs> Handler = OnCancel;

            if (null != Handler)
            {
                Handler(this, nea);
            }
        }
        private void PeriodView_OnPeriodSplitted(object sender, NumberEventArgs e)
        {
            BootPeriodSplitForm periodSplitForm = new BootPeriodSplitForm(Schedule.BootPeriods[e.Number]);

            periodSplitForm.ShowDialog();

            Schedule.BootPeriods.RemoveAt(e.Number);
            Schedule.BootPeriods.InsertRange(e.Number, periodSplitForm.Splitted);

            InitList();
        }
예제 #5
0
        protected override void _enterNumberView_ConfirmNumber(object sender, EventArgs e)
        {
            NumberEventArgs card = e as NumberEventArgs;

            if (card != null)
            {
                SendMessage("Подождите, идет обработка данных...");

                _waitForm = new WaitForm();
                _waitForm.Show();
                _bw.RunWorkerAsync(card.Number);
            }
        }
예제 #6
0
        private void OnTurnEndEvent(object sender, NumberEventArgs args)
        {
            players[args.Number].SetPlayerSteady();
            if (args.Number == 3)
            {
                players[0].SetPlayerReady();
            }

            else
            {
                players[args.Number + 1].SetPlayerReady();
            }
        }
        protected override void _enterNumberView_ConfirmNumber(object sender, EventArgs e)
        {
            // здесь номер введенного ключа
            NumberEventArgs number = e as NumberEventArgs;

            if (number != null)
            {
                SendMessage("Подождите, идет обработка данных...");

                _waitForm = new WaitForm();
                _waitForm.Show();
                _bw.RunWorkerAsync(new NumberEventArgs(number.Number));
            }
        }
예제 #8
0
        protected override void _enterNumberView_ConfirmNumber(object sender, EventArgs e)
        {
            // здесь номер телефона
            NumberEventArgs number = e as NumberEventArgs;

            if (number != null)
            {
                SendMessage("Подождите, идет обработка данных...");

                _waitForm = new WaitForm();
                _waitForm.Show();
                _bw.RunWorkerAsync(new Phones()
                {
                    ClientId = CurrentCard.ClientId, Number = number.Number
                });
            }
        }
예제 #9
0
        private void Wfv_InsertCard(object sender, EventArgs e)
        {
            NumberEventArgs nea = e as NumberEventArgs;

            if (nea != null)
            {
                IEnterCardNumberView enterCardNumberView = new EnterCardNumberView();
                _enterCardNumberPresenter = new EnterPinNumberPresenter(new BoolEventArgs("Вставка карты.", new Cards()
                {
                    CardNumber = nea.Number
                }, BaseViewsFunctionality.StartPageBaseView), enterCardNumberView);
                _enterCardNumberPresenter.Confirm += _enterPinNumberPresenter_Confirm;
                _enterCardNumberPresenter.ToStart += Presenter_ToStart;

                _mainForm.AddView(enterCardNumberView as EnterCardNumberView);
            }
        }
예제 #10
0
        protected override void _enterNumberView_CheckNumber(object sender, EventArgs e)
        {
            if (_basePersonalAreaView == null)
            {
                return;
            }

            NumberEventArgs card = e as NumberEventArgs;

            if (card != null)
            {
                if (CheckNumber(card.Number))
                {
                    (_basePersonalAreaView as IEnterCardNumberView).ConfirmSending(card.Number);
                }
                else
                {
                    SendMessage("Вы ввели неправильный номер телефона");
                }
            }
        }
예제 #11
0
        protected override void _enterNumberView_CheckNumber(object sender, EventArgs e)
        {
            if (_basePersonalAreaView == null)
            {
                return;
            }

            NumberEventArgs pin = e as NumberEventArgs;

            if (pin != null)
            {
                if (CheckNumber(pin.Number))
                {
                    (_basePersonalAreaView as IEnterCardNumberView).ConfirmSending(pin.Number);
                }
                else
                {
                    SendMessage("Вы ввели неправильный ПИН-код");
                }
            }
        }
        protected override void _enterNumberView_CheckNumber(object sender, EventArgs e)
        {
            if (_basePersonalAreaView == null)
            {
                return;
            }

            NumberEventArgs sum = e as NumberEventArgs;

            if (sum != null)
            {
                if (CheckNumber(sum.Number))
                {
                    (_basePersonalAreaView as IEnterCardNumberView).ConfirmSending(sum.Number);
                }
                else
                {
                    SendMessage("Вы ввели неправильную сумму для снятия");
                }
            }
        }
        protected override void _bw_DoWork(object sender, DoWorkEventArgs e)
        {
            NumberEventArgs ph = e.Argument as NumberEventArgs;

            if (ph != null)
            {
                // проверить на валидность полученный ключ
                if (CheckNumber(ph.Number))
                {
                    bool isValidKey = _bankomatLocalService.CheckPhoneKey(CurrentCard.ClientId, _phoneKey);
                    e.Result = isValidKey;
                }
                else
                {
                    e.Result = null;
                }
            }
            else
            {
                e.Result = null;
            }
        }
예제 #14
0
        private void BtnOk_Click(object sender, EventArgs e)
        {
            UpdateNumber();

            string          s = StringPrefix + StringNumber.ToString();
            NumberEventArgs nea;
            Int32           number = 0;

            Int32.TryParse(StringNumber.ToString(), out number);

            if (s.StartsWith("+"))
            {
                nea = new NumberEventArgs(number, NumberEventArgs.Dir.Positive);
            }
            else if (s.StartsWith("-"))
            {
                nea = new NumberEventArgs(number * -1, NumberEventArgs.Dir.Negative);
            }
            else
            {
                nea = new NumberEventArgs(number, NumberEventArgs.Dir.Set);
            }

            EventHandler <NumberEventArgs> Handler = OnOk;

            if (null != Handler)
            {
                Handler(this, nea);
            }

            ReuseNumber    = s;
            TxtNumber.Text = "(" + TxtNumber.Text + ")";

            StringNumber = new StringBuilder();
            StringPrefix = "";
        }
예제 #15
0
 void ReadyHandler(object o, NumberEventArgs e)
 {
     OnReady(e.ID);
 }
예제 #16
0
 private void ReservedInfoView_OnReservedForgotten(object sender, NumberEventArgs e)
 {
     Reserved.RemoveAt(e.Number);
     InitList();
 }
 private void BootPeriodView_OnPeriodDeleted(object sender, NumberEventArgs e)
 {
     Schedule.BootPeriods.RemoveAt(e.Number);
     InitList();
 }
예제 #18
0
 protected virtual void OnDiceRolled(NumberEventArgs args)
 {
     RaiseDiceRollEvent?.Invoke(this, args);
 }
 // eventhandler Method
 private void ShowMessage(object sender, NumberEventArgs e)
 {
  MessageBox.Show("Hello user your ticket no is:" + e.getNumber().ToString());
 }
예제 #20
0
 protected virtual void OnTurnEnd(NumberEventArgs args)
 {
     TurnEndEvent?.Invoke(this, args);
 }
예제 #21
0
 private void OnTokenSelectionEvent(object sender, NumberEventArgs args)
 {
     LockTokens(args.Number);
     tokens[args.Number].MoveSteps(dice.Value);
 }
예제 #22
0
 private void OnDiceRollEvent(object sender, NumberEventArgs args)
 {
     UnlockTokens(args.Number);
 }
예제 #23
0
 private void NumberCruncher_NumberEvent(object sender, NumberEventArgs e)
 {
     SendNotification(e.Number.ToString());
 }
예제 #24
0
 protected virtual void OnTokenSelection(NumberEventArgs args)
 {
     RaiseTokenSelectionEvent?.Invoke(this, args);
 }
예제 #25
0
 private async void NumberCruncher_NumberEvent(object sender, NumberEventArgs e)
 {
     Debug.WriteLine($"{ApplicationView.GetForCurrentView().Id} is trying to display {e.Id} {e.Number} on {Environment.CurrentManagedThreadId}");
     listView.Items.Add($"{e.Id} sent {e.Number}");
 }