Пример #1
0
        //[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
        private void Refresh(object sender, CashInEventArgs e)
        {
            EventHandler <CashInEventArgs> tmpCI = CashIn;              //for thread safety

            if (sender is InnovativeTechnology.NVNoteValidator)
            {
                Log.Debug("typ is NV");
            }
            if (sender is Comestero.RM5)
            {
                Log.Debug("typ is RM5");
            }

            /*if (sender.GetType() == typeof(InnovativeTechnology.NVNoteValidator))
             *      Console.WriteLine("typ is NV");*/
            if (e.MoneyIn > 0)
            {
                lock (creditLock) {
                    this.credit += e.MoneyIn;

                    if (tmpCI != null)                                          //fire event (to CashInManager)
                    {
                        tmpCI(sender, new CashInEventArgs(e.MoneyIn, this.credit, e.IsCoin));
                    }

                    if (maxCredit > 0)
                    {
                        SetEnabledChannels(this.credit);
                    }
                }
            }
        }
Пример #2
0
        protected virtual void OnCashInAfterDisable(CashInEventArgs e)
        {
            EventHandler <CashInEventArgs> tmpCI = CashIn;       //for thread safety

            if (tmpCI != null)
            {
                tmpCI(this, e);
            }
        }