void OnFinished(object sender, MFComposeResultEventArgs e) { e.Controller.DismissModalViewControllerAnimated (true); e.Controller.Dispose(); DeselectAll(); this.TabBarController.SelectedIndex = 1; }
void HandleMailFinished(object sender, MFComposeResultEventArgs e) { UIApplication.SharedApplication.InvokeOnMainThread(delegate { if (e.Result == MFMailComposeResult.Sent) { // No action required } else if (e.Result == MFMailComposeResult.Cancelled) { // No action required } else if (e.Result == MFMailComposeResult.Failed) { INotification notificationService = (INotification)IPhoneServiceLocator.GetInstance().GetService("notify"); if (notificationService != null) { notificationService.StartNotifyAlert("Mail Error", "Failed to send mail.\n" + e.Error, "OK"); } } else if (e.Result == MFMailComposeResult.Saved) { INotification notificationService = (INotification)IPhoneServiceLocator.GetInstance().GetService("notify"); if (notificationService != null) { notificationService.StartNotifyAlert("Mail Alert", "Mail saved to draft.", "OK"); } } // method reviewed (15 April 2014). e.Controller.DismissViewController(true, null); // deprecated --> e.Controller.DismissModalViewController (true); }); }
void HandleMailFinished (object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { var alert = new UIAlertView ("Mail Alert", "Mail Sent", null, "Mail Demo", null); alert.Show (); } e.Controller.DismissModalViewControllerAnimated (true); }
protected virtual void MailController_Finished(object sender, MFComposeResultEventArgs args) { this.ExecuteMethodOnMainThread("MailController_Finished", delegate() { args.Controller.Finished -= MailController_Finished; args.Controller.DismissViewController(true, null); }); }
void HandleMailFinished(object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { var alert = new UIAlertView("Mail Alert", "Mail Sent", null, "Mail Demo", null); alert.Show(); } e.Controller.DismissModalViewControllerAnimated(true); }
void HandleMailFinished (object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { MessageBox.Show("E-post sendt", ""); } else if(e.Result == MFMailComposeResult.Failed){ MessageBox.Show("Å nei!", "E-post feilet. Prøv igjen senere, eller meld inn feil."); } e.Controller.DismissModalViewControllerAnimated (true); }
void HandleMailFinished(object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { UIAlertView alert = new UIAlertView ("Mail Alert", "Mail Sent", null, "Yippie", null); alert.Show (); // you should handle other values that could be returned // in e.Result and also in e.Error } e.Controller.DismissModalViewControllerAnimated (true); }
private void HandleMailFinished(object sender, MFComposeResultEventArgs e) { var uiViewController = sender as UIViewController; if (uiViewController == null) { throw new ArgumentException("sender"); } uiViewController.DismissViewController(true, () => { }); _modalHost.NativeModalViewControllerDisappearedOnItsOwn(); }
void HandleMailFinished(object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { UIAlertView alert = new UIAlertView ("Talk Bot", "Audio file added to outgoing mail.", null, "OK", null); alert.Show (); } else if (e.Result == MFMailComposeResult.Failed) { UIAlertView alert = new UIAlertView ("Talk Bot", "Could not send mail.", null, "OK", null); alert.Show (); } e.Controller.DismissModalViewControllerAnimated (true); }
private void HandleMailFinished(object sender, MFComposeResultEventArgs e) { var uiViewController = sender as UIViewController; if (uiViewController == null) { throw new ArgumentException("sender"); } _mail.Finished -= HandleMailFinished; uiViewController.DismissViewController(true, () => { }); _mail = null; }
private void HandleMailFinished(object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { UIAlertView alert = new UIAlertView("Mail Alert", "Mail Sent", null, "Mail Successfully Sent!", null); alert.Show(); // you should handle other values that could be returned // in e.Result and also in e.Error } e.Controller.DismissModalViewControllerAnimated(true); }
void HandleMailFinished(object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { UIAlertView alert = new UIAlertView("Mail Alert", "Mail Sent", null, "Yippie", null); alert.Show(); // you should handle other values that could be returned // in e.Result and also in e.Error } e.Controller.DismissViewController(true, () => { }); }
void HandleMailFinished(object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { UIAlertView alert = new UIAlertView("App", "Pdf file attached to outgoing mail.", null, "OK", null); alert.Show(); } else if (e.Result == MFMailComposeResult.Failed) { UIAlertView alert = new UIAlertView("App", "Could not send mail.", null, "OK", null); alert.Show(); } e.Controller.DismissModalViewControllerAnimated(true); }
private void HandleMailFinished(object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { UIAlertView alert = new UIAlertView("Mail Alert", "Mail Sent", null, "Good luck!", null); alert.Show(); } else if (e.Result == MFMailComposeResult.Failed) { UIAlertView alert = new UIAlertView("Mail Alert", "Mail Failed", null, "Please try again later.", null); alert.Show(); } e.Controller.DismissModalViewControllerAnimated(true); }
private void HandleMailFinished(object sender, MFComposeResultEventArgs e) { try { if (e.Result == MFMailComposeResult.Sent) { ModalDialog.Alert("Your email was sent", ""); } e.Controller.DismissModalViewControllerAnimated(true); } catch (Exception ex) { Logger.Warn("Unhandled error when calling DismissModalViewControllerAnimated: {0}", ex); } }
void HandleMailFinished(object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { UIAlertView alert = new UIAlertView ("E-mail Sent", "If you are ordering printed materials, the lot number " + lotNumber + " will be printed on them. Use this number to ensure you received the correct order.", null, "OK", null); alert.Show (); // you should handle other values that could be returned // in e.Result and also in e.Error } e.Controller.DismissModalViewControllerAnimated (true); }
private void HandleMailFinished (object sender, MFComposeResultEventArgs e) { switch (e.Result) { case MFMailComposeResult.Cancelled: break; case MFMailComposeResult.Saved: break; case MFMailComposeResult.Sent: using (var alert = new UIAlertView ("Email",Locale.GetText("Ihre Nachricht wurde gesendet."), null,"OK", null)) { alert.Show (); } break; case MFMailComposeResult.Failed: break; default: using (var alert = new UIAlertView ("Email",Locale.GetText("Sending Failed - Unknown Error"), null,"OK", null)) { alert.Show (); } break; } e.Controller.DismissViewController (true, null); }
private void HandleMailFinished(object sender, MFComposeResultEventArgs e) { (sender as UIViewController).DismissViewController(true, () => {}); _presenter.NativeModalViewControllerDisappearedOnItsOwn(); }
void HandleMailFinished(object sender, MFComposeResultEventArgs e) { UIApplication.SharedApplication.InvokeOnMainThread (delegate { if (e.Result == MFMailComposeResult.Sent) { // No action required } else if (e.Result == MFMailComposeResult.Cancelled) { // No action required } else if (e.Result == MFMailComposeResult.Failed) { INotification notificationService = (INotification)IPhoneServiceLocator.GetInstance ().GetService ("notify"); if (notificationService != null) { notificationService.StartNotifyAlert ("Mail Error", "Failed to send mail.\n" + e.Error, "OK"); } } else if (e.Result == MFMailComposeResult.Saved) { INotification notificationService = (INotification)IPhoneServiceLocator.GetInstance ().GetService ("notify"); if (notificationService != null) { notificationService.StartNotifyAlert ("Mail Alert", "Mail saved to draft.", "OK"); } } // method reviewed (15 April 2014). e.Controller.DismissViewController(true, null); // deprecated --> e.Controller.DismissModalViewController (true); }); }
void HandleMailFinished (object sender, MFComposeResultEventArgs e) { if (e.Result == MFMailComposeResult.Sent) { MessageBox.Show(Utils.Translate("emailsent"), ""); } else if(e.Result == MFMailComposeResult.Failed){ MessageBox.Show(Utils.Translate("error"), Utils.Translate("error_mailfail")); } e.Controller.DismissModalViewControllerAnimated (true); }
private void SendEmailFinished(Object o, MFComposeResultEventArgs e) { this.DismissViewController (true, null); }
static void mcontroller_Finished(object sender, MFComposeResultEventArgs e) { e.Controller.DismissViewController(true, null); }
private void HandleMailFinished(object sender, MFComposeResultEventArgs e) { try { if (e.Result == MFMailComposeResult.Sent) ModalDialog.Alert("Your email was sent", ""); e.Controller.DismissModalViewControllerAnimated(true); } catch (Exception ex) { Logger.Warn("Unhandled error when calling DismissModalViewControllerAnimated: {0}", ex); } }
private void EmailController_Finished(object sender, MFComposeResultEventArgs e) { e.Controller.DismissViewController(true, null); }