protected void ShowMessageBox(string title, string message)         //, Action onOKAction)
        {
            IUserDialogs dlg = Mvx.Resolve <IUserDialogs> ();

            if (dlg == null)
            {
                return;
            }

            InvokeOnMainThread(() => {
                AlertConfig cfg = new AlertConfig();
                cfg.SetTitle(title);
                cfg.SetMessage(message);
                //cfg.OnAction = onOKAction;
                dlg.Alert(cfg);
            });
        }
Ejemplo n.º 2
0
 public static void ShowAlertMessage <T>(T response, Page page) where T : BaseResponse
 {
     if (!string.IsNullOrWhiteSpace(response.ApiMessage))
     {
         var aConfi = new AlertConfig();
         aConfi.SetMessage(response.ApiMessage);
         aConfi.SetTitle("Помилка");
         aConfi.SetOkText("Ок");
         UserDialogs.Instance.Alert(aConfi);
     }
     if (!string.IsNullOrWhiteSpace(response.BaseMessage))
     {
         var aConfi = new AlertConfig();
         aConfi.SetMessage(response.BaseMessage);
         aConfi.SetTitle("Помилка");
         aConfi.SetOkText("Ок");
         UserDialogs.Instance.Alert(aConfi);
     }
 }