private void OnCancelTurn(CancelActionEventArgs e) { EventHandler <CancelActionEventArgs> handler = CancelTurn; if (handler != null) { handler(this, e); } }
public void CancelPlayerAction(object sender, CancelActionEventArgs e) { if (e.player != this) { return; } // escapes events that are not targeted at this Player IsAwaitingAction = false; this.awaitingActionArgs = null; IsFoldAvailable = false; IsCheckAvailable = false; IsCallAvailable = false; IsRaiseAvailable = false; // update CurrentContribution if necessary, NOT REALLY WORKING CurrentContribution = e.contribution > 0 ? e.contribution : currentContribution; // used to immediately update 'canCheck/canRaise' CommandManager.InvalidateRequerySuggested(); }