/// <summary> /// If in escrow mode, check that we have the specified index enabled /// </summary> /// <param name="sender"></param> /// <param name="index"></param> private void validator_OnEscrow(object sender, EscrowArgs e) { lastIndex = e.Index; Console.WriteLine("Event raised for {0}", lastIndex); DoOnUIThread(() => { // Here you could also a call to check the user's account balance to make sure they're not // exceeding a specified amount. Remember, returns and rejects can be triggered by a few things: // 1) Reject : Invalid note // 2) Reject : Cheat attemp // 3) Return : Note disabled by E/D mask // 4) Return : Host manually send return message because a check failed (e.g. too much money on user account etc.) // If we're already taken action, clear the actionTaken flag. Otherwise enable our // manual buttons so an action can be taken. lock (manualLock) { EnableManualButtons = true; } }); }
private static void validator_OnEscrow(object sender, EscrowArgs e) { Console.WriteLine("Bill {0} is in escrow", e.Index); AppState = InternalState.Escrow; }