void RaiseInvokeErrorEvent(CoinAcceptorErrorEventArgs ea)
 {
     if (CoinAccepted != null)
     {
         ErrorMessageAccepted(this, ea);
     }
 }
        void _coinAcceptor_ErrorMessageAccepted(object sender, CoinAcceptorErrorEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke((EventHandler<CoinAcceptorErrorEventArgs>)_coinAcceptor_ErrorMessageAccepted, sender, e);
                return;
            }

            txtLog.Text += String.Format("Coin acceptor error: {0} ({1}, {2:X2})", e.ErrorMessage, e.Error, (Byte)e.Error) + Environment.NewLine;
        }
Example #3
0
        void CoinAcceptorErrorMessageAccepted(object sender, CoinAcceptorErrorEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke((EventHandler<CoinAcceptorErrorEventArgs>)CoinAcceptorErrorMessageAccepted, sender, e);
                return;
            }

            listBox1.Items.Add(String.Format("Coin acceptor error: {0} ({1}, {2:X2})", e.ErrorMessage, e.Error, (Byte)e.Error));

            listBox1.SelectedIndex = listBox1.Items.Count - 1;
        }
Example #4
0
 void RaiseInvokeErrorEvent(CoinAcceptorErrorEventArgs ea)
 {
     if (CoinAccepted != null)
         ErrorMessageAccepted(this, ea);
 }