/// <summary> /// On credit, add the val to our bill bank. /// </summary> /// <param name="sender"></param> /// <param name="denomination"></param> private void validator_OnCredit(object sender, CreditArgs e) { var denomination = e.Index; if (currencyMap.ContainsKey(denomination)) { if (denomination > 0) { Console.WriteLine("Credited ${0}", AddCredit(denomination)); } else { Console.WriteLine("Failed to credit: {0}", denomination); } } }
private static void validator_OnCredit(object sender, CreditArgs e) { Console.WriteLine("Bill {0} has credited", e.Index); AppState = InternalState.Idle; }
void validator_OnCredit(object sender, CreditArgs e) { Console.WriteLine("Credited bill#: {0}", e.Index); }