Beispiel #1
0
 void DisplayMessageBox(string title, string message, Note.MessageBoxResult onResult)
 {
     Rock.Mobile.Threading.Util.PerformOnUIThread(delegate
     {
         UIAlertView alert = new UIAlertView( );
         alert.Title       = title;
         alert.Message     = message;
         alert.AddButton(GeneralStrings.Yes);
         alert.AddButton(GeneralStrings.No);
         alert.Show( );
         alert.Clicked += (object sender, UIButtonEventArgs e) =>
         {
             onResult(( int )e.ButtonIndex);
         };
     });
 }
Beispiel #2
0
 void DisplayMessageBox(string title, string message, Note.MessageBoxResult onResult)
 {
     Rock.Mobile.Threading.Util.PerformOnUIThread(delegate
     {
         AlertDialog.Builder dlgAlert = new AlertDialog.Builder(Rock.Mobile.PlatformSpecific.Android.Core.Context);
         dlgAlert.SetTitle(title);
         dlgAlert.SetMessage(message);
         dlgAlert.SetNeutralButton(GeneralStrings.Yes, delegate
         {
             onResult(0);
         });
         dlgAlert.SetPositiveButton(GeneralStrings.No, delegate(object sender, DialogClickEventArgs ev)
         {
             onResult(1);
         });
         dlgAlert.Create( ).Show( );
     });
 }