コード例 #1
0
        public void StartReturnPayment(Money money)
        {
            EventItem eventItem = new EventItem();

            switch (_type)
            {
            case TestWorkCard.StartedPaymentBad:
                OnReturnPayment?.Invoke(this, new CardEventArgs()
                {
                    Money = money, Event = EventItem.Error("Started payment started bad")
                });
                break;

            case TestWorkCard.FinishedPaymentGood:
                OnReturnPayment?.Invoke(this, new CardEventArgs()
                {
                    Money = money, Event = EventItem.Info("Return payment finished good")
                });
                break;

            case TestWorkCard.FinishedPaymentBad:
                OnReturnPayment?.Invoke(this, new CardEventArgs()
                {
                    Money = money, Event = EventItem.Error("Return payment finished bad")
                });
                break;

            case TestWorkCard.StartReturnPaymentBad:
                OnReturnPayment?.Invoke(this, new CardEventArgs()
                {
                    Money = money, Event = EventItem.Error("Return payment started bad")
                });
                break;

            case TestWorkCard.StopPaymentGood:
                OnReturnPayment?.Invoke(this, new CardEventArgs()
                {
                    Money = money, Event = EventItem.Error("Stop payment is good")
                });

                break;

            case TestWorkCard.StopPaymentBad:
                OnReturnPayment?.Invoke(this, new CardEventArgs()
                {
                    Money = money, Event = EventItem.Error("Stop payment is bad")
                });

                break;

            default:
                OnReturnPayment?.Invoke(this, new CardEventArgs()
                {
                    Money = money, Event = EventItem.Error("Return payment has error")
                });

                break;
            }
        }
コード例 #2
0
 private void CardDevice_OnReturnPayment(object sender, CardEventArgs e)
 {
     OnReturnPayment?.Invoke(this, e);
 }