partial void DisplayOkCancelAlert(Foundation.NSObject sender) { // User helper class to present alert AlertViewController.PresentOKCancelAlert("A Short Title is Best", "The message should be a short, complete sentence.", this, (ok) => { Console.WriteLine("OK/Cancel Alert: The user selected {0}", ok); }); }
/// <summary> /// This action is triggered when the Buy button is clicked using the Apple Remote. /// </summary> /// <param name="sender">Sender.</param> partial void BuyButton_PrimaryActionTriggered(UIButton sender) { AlertViewController.PresentOKCancelAlert("Add Flower to Shopping Cart", "Would you like to add the currently selected flower to your shopping cart?", this, (ok) => { }); }
/// <summary> /// Handles the user clicking the Flight button. /// </summary> /// <param name="sender">Sender.</param> partial void BookFlight(NSObject sender) { // Ask user to book flight AlertViewController.PresentOKCancelAlert("Book Flight", string.Format("Would you like to book a flight to {0}?", Attraction.City.Name), this, (ok) => { Attraction.City.FlightBooked = ok; IsFlighBooked.Hidden = (!Attraction.City.FlightBooked); }); }
/// <summary> /// Handles the user clicking the Directions button. /// </summary> /// <param name="sender">Sender.</param> partial void GetDirections(NSObject sender) { // Ask user to add directions AlertViewController.PresentOKCancelAlert("Add Directions", string.Format("Would you like to add directions to {0} to you itinerary?", Attraction.Name), this, (ok) => { Attraction.AddDirections = ok; IsDirections.Hidden = (!Attraction.AddDirections); }); }