Ejemplo n.º 1
0
 private void NextObject(String code)
 {
     UserObjectEventArgs args = new UserObjectEventArgs();
     args.NextObject = code;
     args.data["PERSON_INFO"] = info;
     RaiseNextObjectEvent(args);
 }
Ejemplo n.º 2
0
        public override void Init(UserObjectEventArgs args)
        {
            base.Init(args);
            waiting = true;
            commitLabel.Text = commitString;
            commitLabel.ForeColor = Color.White;

            amount = Convert.ToUInt64(args.data["AMOUNT"]);

            senderLabel.Text = welcome1.Replace("NAMEHERE", info.name);
            amountLabel.Text = amountString.Replace("AMOUNTHERE", moneyToString(amount));
        }
Ejemplo n.º 3
0
        public override void Init(UserObjectEventArgs args)
        {
            base.Init(args);
            waiting = true;
            commitLabel.Text = commitString;
            commitLabel.ForeColor = Color.White;

            if (!args.data.ContainsKey("RECV_INFO") || !(args.data["RECV_INFO"] is Database.ATMLoginInfo))
            {
                MessageBox.Show("Args doesn't contain RECV_INFO", "ATMAmount::Init ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            recvInfo = (Database.ATMLoginInfo)(args.data["RECV_INFO"]);
            amount = Convert.ToUInt64(args.data["AMOUNT"]);

            senderLabel.Text = welcome1.Replace("NAMEHERE", info.name);
            receiverLabel.Text = welcome2.Replace("NAMEHERE", recvInfo.name);
            amountLabel.Text = amountString.Replace("AMOUNTHERE", moneyToString(amount));
        }
Ejemplo n.º 4
0
        protected override void HandleNextObjectEvent(object sender, UserObjectEventArgs e)
        {
            base.HandleNextObjectEvent(sender, e);
            if (e.data.ContainsKey("VALUE"))
            {
                score.Text = Convert.ToString(e.data["VALUE"]);
            }
            else
            {
                score.Text = "нет";
            }

            if (e.data.ContainsKey("MIDDLE"))
            {
                middle.Text = Convert.ToString(e.data["MIDDLE"]);
            }
            else
            {
                middle.Text = "нет";
            }
        }
Ejemplo n.º 5
0
        void TickAccept(object sender, EventArgs e)
        {
            myTimer.Stop();
            myTimer.Tick -= TickAccept;

            UserObjectEventArgs args = new UserObjectEventArgs();
            args.NextObject = "PINCODE";
            args.data["PERSON_INFO"] = info;

            RaiseNextObjectEvent(args);
        }
Ejemplo n.º 6
0
 private void TimerEventReject(Object myObject, EventArgs myEventArgs)
 {
     myTimer.Stop();
     myTimer.Tick -= TimerEventReject;
     pinBox.Text = "";
     UserObjectEventArgs args = new UserObjectEventArgs();
     args.NextObject = "START";
     RaiseNextObjectEvent(args);
 }
Ejemplo n.º 7
0
 private void TimerEventAccept(Object myObject, EventArgs myEventArgs)
 {
     myTimer.Stop();
     myTimer.Tick -= TimerEventAccept;
     UserObjectEventArgs args = new UserObjectEventArgs();
     args.data.Add("PERSON_INFO", info);
     args.NextObject = "SELECT";
     RaiseNextObjectEvent(args);
 }
Ejemplo n.º 8
0
        public override void Init(UserObjectEventArgs args)
        {
            base.Init(args);

            Init2();
        }
Ejemplo n.º 9
0
        private void NextTimerProcessor(object sender, EventArgs e)
        {
            myTimer.Stop();
            myTimer.Tick -= NextTimerProcessor;

            UserObjectEventArgs args = new UserObjectEventArgs();
            args.NextObject = "AMOUNT";
            args.data["PERSON_INFO"] = info;
            args.data["RECV_INFO"] = recvInfo;
            RaiseNextObjectEvent(args);
        }
Ejemplo n.º 10
0
 // Common methods
 public virtual void Init(UserObjectEventArgs args)
 {
 }
Ejemplo n.º 11
0
        void SetCurrentKey(String newKey, UserObjectEventArgs e)
        {
            if (currentObjectKey != null && userObjects[currentObjectKey] != null)
            {
                userObjects[currentObjectKey].NextObjectEvent -= new EventHandler<UserObjectEventArgs>(HandleNextObjectEvent);
                userObjects[currentObjectKey].Deinit();
                userObjects[currentObjectKey].Hide();
            }
            currentObjectKey = newKey;
            if (currentObjectKey != null && userObjects[currentObjectKey] != null)
            {
                userObjects[currentObjectKey].Init(e);
                userObjects[currentObjectKey].Show();
                userObjects[currentObjectKey].NextObjectEvent += new EventHandler<UserObjectEventArgs>(HandleNextObjectEvent);
                userObjects[currentObjectKey].Focus();

                RecordActivity();
            }
        }
Ejemplo n.º 12
0
        private void TimerEventAccept(Object myObject, EventArgs myEventArgs)
        {
            myTimer.Stop();
            myTimer.Tick -= TimerEventAccept;
            UserObjectEventArgs args = new UserObjectEventArgs();
            args.NextObject = "STOCK_DIRECT_CONFIRM";
            args.data["PERSON_INFO"] = info;
            args.data["COMPANY_INFO"] = companyInfo;
            args.data["QTY"] = qty;
            args.data["PRICE"] = price;
            args.data["RECEIVER_INFO"] = receiverInfo;

            RaiseNextObjectEvent(args);
        }
Ejemplo n.º 13
0
        private void NextTimerProcessor(object sender, EventArgs e)
        {
            myTimer.Stop();
            myTimer.Tick -= NextTimerProcessor;

            UserObjectEventArgs args = new UserObjectEventArgs();
            args.NextObject = "START";
            RaiseNextObjectEvent(args);
        }
Ejemplo n.º 14
0
        private void TickAccept(object sender, EventArgs e)
        {
            myTimer.Tick -= TickAccept;
            myTimer.Stop();

            UserObjectEventArgs args = new UserObjectEventArgs();
            args.NextObject = "QUESTION";
            args.data["PERSON_INFO"] = info;
            args.data["SESSION_ID"] = sessionId;
            args.data["VALUE"] = 0;
            args.data["MIDDLE"] = 0.0;

            RaiseNextObjectEvent(args);
        }
Ejemplo n.º 15
0
 protected void RaiseNextObjectEvent(UserObjectEventArgs args)
 {
     EventHandler<UserObjectEventArgs> handler = NextObjectEvent;
     if(handler != null)
         handler(this, args);
 }
Ejemplo n.º 16
0
 private void TimerEventAccept(Object myObject, EventArgs myEventArgs)
 {
     myTimer.Stop();
     myTimer.Tick -= TimerEventAccept;
     UserObjectEventArgs args = new UserObjectEventArgs();
     args.data["PERSON_INFO"] = info;
     args.data["AMOUNT"] = amount;
     args.NextObject = "VERIFY";
     RaiseNextObjectEvent(args);
 }
Ejemplo n.º 17
0
 protected virtual void HandleNextObjectEvent(object sender, UserObjectEventArgs e)
 {
     SetCurrentKey(e.NextObject, e);
 }