private void _billValidator_BillReceived(object Sender, BillReceivedEventArgs e)
        {
            //string script = string.Format("x = y.innerText.replace(/[^0-9\\.]+/g, ''); x = (parseInt(x) + {0}) + '₸'; y.innerText = x;", e.Value);
            string script = string.Format("x = y.innerText.replace(/[^0-9\\.]+/g, ''); x = (parseInt(x) + {0}); y.innerText = x;", e.Value);

            _chromiumWebBrowser.ExecuteScriptAsync(script);
        }
Example #2
0
 static void c_BillReceived(object Sender, BillReceivedEventArgs e)
 {
     if (e.Status == BillRecievedStatus.Rejected)
     {
         Console.WriteLine(e.RejectedReason);
     }
     else if (e.Status == BillRecievedStatus.Accepted)
     {
         Sum += e.Value;
         Console.WriteLine("Bill accepted! " + e.Value + " руб. Общая сумму: " + Sum.ToString());
     }
 }
Example #3
0
 static void c_BillReceived(object Sender, BillReceivedEventArgs e)
 {
     if (e.Status == BillRecievedStatus.Rejected)
     {
         Console.WriteLine(e.RejectedReason);
     }
     else if (e.Status == BillRecievedStatus.Accepted)
     {
         Sum += e.Value;
         // Kan zijn dat programma niet out of the box met euro's werkt maar met russische roebels
         Console.WriteLine("Bill accepted! " + e.Value + " euro. Total amount: " + Sum.ToString());
     }
 }
Example #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="Sender"></param>
 /// <param name="e"></param>
 private void _billValidator_BillReceived(object Sender, BillReceivedEventArgs e)
 {
     Logger.Log(Logger.Level.Info, string.Format("Banknote rejecting. Reason: {0}. Status: {1}. Sum: {2}₸", e.RejectedReason, e.Status, e.Value));
 }
 private void OnBillReceived(BillReceivedEventArgs e)
 {
     BillReceived?.Invoke(this, new BillReceivedEventArgs(e.Status, e.Bill, e.Exception));
 }
Example #6
0
 private void UpdateBalanceHandler(object sender, BillReceivedEventArgs e)
 {
     UpdateBalance();
 }