partial void CmdChangePos_TouchUpInside(UIButton sender) { // --------------------------------------------------------- if (g.UsingDh && gameState == EGameState.PreGame) { // Allow to choose dh... CAlert.ShowActionSheet( "Change Position", "Choose a new position for the selected player:", new string[] { "c", "1b", "2b", "3b", "ss", "lf", "cf", "rf", "dh", "Cancel" }, new Action <UIAlertAction>[] { //alert => PostPosChangeMsg(1), alert => PostPosChangeMsg(2), alert => PostPosChangeMsg(3), alert => PostPosChangeMsg(4), alert => PostPosChangeMsg(5), alert => PostPosChangeMsg(6), alert => PostPosChangeMsg(7), alert => PostPosChangeMsg(8), alert => PostPosChangeMsg(9), alert => PostPosChangeMsg(10), alert => PostPosChangeMsg(-1) }, this ); } else { // Cannot choose dh... CAlert.ShowActionSheet( "Change Position", "Choose a new position for the selected player:", new string[] { "c", "1b", "2b", "3b", "ss", "lf", "cf", "rf", "Cancel" }, new Action <UIAlertAction>[] { //alert => PostPosChangeMsg(1), alert => PostPosChangeMsg(2), alert => PostPosChangeMsg(3), alert => PostPosChangeMsg(4), alert => PostPosChangeMsg(5), alert => PostPosChangeMsg(6), alert => PostPosChangeMsg(7), alert => PostPosChangeMsg(8), alert => PostPosChangeMsg(9), alert => PostPosChangeMsg(-1) }, this ); } }
partial void CmdTestIt_TouchUpInside(UIButton sender) { // -------------------------------------------------------- cmdDoIt.Hidden = false; //ShowYesNoAlert( // "OK / Cancel Alert", // "This is a sample alert with an OK / Cancel Button", // "Okay", "Cancel", // alert => cmdDoIt.SetTitle ("Okay", UIControlState.Normal), // alert => cmdDoIt.SetTitle ("Cancel", UIControlState.Normal), // this //); //// This demonstrates that even though the lambdas are sent & executed in a foriegn class, //// they see the local environment, namely the local vars sOkay and sCanc. // string sOkay = "Okay!"; // string sCanc = "Cancel!"; // CAlert.ShowYesNoAlert ( // "OK / Cancel Alert", // "This is a sample alert with an OK / Cancel Button", // "Okay", "Cancel", // alert => cmdDoIt.SetTitle (sOkay, UIControlState.Normal), // alert => cmdDoIt.SetTitle (sCanc, UIControlState.Normal), // this // ); CAlert.ShowActionSheet( "Action Sheet sample", "This is a sample action sheet with 3 actions", new string [] { "Yes", "No", "Maybe" }, new Action <UIAlertAction> [] { alert => cmdDoIt.SetTitle("Yes", UIControlState.Normal), alert => cmdDoIt.SetTitle("No", UIControlState.Normal), alert => cmdDoIt.SetTitle("Maybe", UIControlState.Normal) }, this ); }