Exemplo n.º 1
0
            public override void Finished(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
            {
                switch (result)
                {
                case MFMailComposeResult.Failed:
                    MessageBox alert = new MessageBox();
                    alert.ShowAlert("Email Failed", error.Description, "Ok");
                    break;

                default:
                    break;
                }

                this.InvokeOnMainThread(delegate
                {
                    controller.DismissViewController(true, delegate
                    {
                        if (controller != null)
                        {
                            // Dispose of the view object.
                            controller.Dispose();
                            controller = null;
                        }
                    });
                });
            }
Exemplo n.º 2
0
 public override void Finished(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
 {
     if (cbFinished != null)
     {
         cbFinished(controller, new MFComposeResultEventArgs(controller, result, error));
     }
 }
Exemplo n.º 3
0
 internal static void OnMailCompleted(MFMailComposeResult result, NSError error)
 {
     if (_mailCompletedHandlers != null)
     {
         _mailCompletedHandlers(null, new MailCompletedEventArgs(result, error));
     }
 }
Exemplo n.º 4
0
 //        /// <summary>
 //        /// Whether the operation was completed.
 //        /// </summary>
 //        [Obsolete("Use the completed property.")]
 //        public readonly bool Completed;
 /// <summary>
 /// Initializes a new instance of the <see cref="U3DXT.iOS.Social.MailCompletedEventArgs"/> class.
 /// </summary>
 /// <param name='result'>
 /// Result.
 /// </param>
 /// <param name='error'>
 /// Error.
 /// </param>
 public MailCompletedEventArgs(MFMailComposeResult result, NSError error)
 {
     this.result = result;
     this.error = error;
     this.completed = (result == MFMailComposeResult.Sent);
     //			this.Result = result;
     //			this.Error = error;
     //			this.Completed = (result == MFMailComposeResult.Sent);
 }
Exemplo n.º 5
0
//		/// <summary>
//		/// Whether the operation was completed.
//		/// </summary>
//		[Obsolete("Use the completed property.")]
//		public readonly bool Completed;

        /// <summary>
        /// Initializes a new instance of the <see cref="U3DXT.iOS.Social.MailCompletedEventArgs"/> class.
        /// </summary>
        /// <param name='result'>
        /// Result.
        /// </param>
        /// <param name='error'>
        /// Error.
        /// </param>
        public MailCompletedEventArgs(MFMailComposeResult result, NSError error)
        {
            this.result    = result;
            this.error     = error;
            this.completed = (result == MFMailComposeResult.Sent);
//			this.Result = result;
//			this.Error = error;
//			this.Completed = (result == MFMailComposeResult.Sent);
        }
        // Overridden from MFMailComposeViewControllerDelegate
        public override void Finished(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
        {
            // TODO [email protected]: These toasts don't work
            // the view controller is gone by the time they post. we will need to figure out
            // a better way to notify the user.
            switch (result)
            {
            case MFMailComposeResult.Sent:
                Toast.New(controller.View, Strings.Help.SENT_FEEDBACK);
                break;

            case MFMailComposeResult.Failed:
                Toast.New(controller.View, Strings.Errors.FAILED_TO_SEND_FEEDBACK);
                break;
            }

            controller.DismissModalViewController(true);
        }
 public override void DidFinish(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
 {
     controller.DismissViewController(true, null);
     SocialXT.OnMailCompleted(result, error);
 }
Exemplo n.º 8
0
 public MFComposeResultEventArgs(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
 {
     Result = result;
     Error = error;
     Controller = controller;
 }
 public override void DidFinish(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
 {
     controller.DismissViewController(true, null);
     SocialXT.OnMailCompleted(result, error);
 }
		public void Finished (MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
		{
			controller.DismissViewController(true, null);
		}
Exemplo n.º 11
0
 public MFComposeResultEventArgs(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
 {
     Result     = result;
     Error      = error;
     Controller = controller;
 }
Exemplo n.º 12
0
 internal static void OnMailCompleted(MFMailComposeResult result, NSError error)
 {
     if (_mailCompletedHandlers != null)
         _mailCompletedHandlers(null, new MailCompletedEventArgs(result, error));
 }
Exemplo n.º 13
0
 public override void Finished(MFMailComposeViewController controller,
                               MFMailComposeResult result, NSError error)
 {
     controller.DismissViewController(true, DoCompletedAction);
 }
Exemplo n.º 14
0
 public override void Finished(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
 {
     ModalManager.EnqueueModalTransition(controller.PresentingViewController, null, true);
 }
Exemplo n.º 15
0
 public override void DidFinish(MFMailComposeViewController viewController, MFMailComposeResult result, NSError error)
 {
     viewController.DismissViewController(true, null);
 }
Exemplo n.º 16
0
 public override void Finished(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
 {
     if (cbFinished != null)
         cbFinished (controller, new MFComposeResultEventArgs (controller, result, error));
 }
Exemplo n.º 17
0
 public override void DidFinish(MFMailComposeViewController viewController, MFMailComposeResult result, NSError error)
 {
     viewController.DismissViewController(true, null);
 }
 public override void Finished(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
 {
     controller.DismissModalViewControllerAnimated(true);
 }
Exemplo n.º 19
0
                public override void Finished(MFMailComposeViewController controller, MFMailComposeResult result, NSError error)
                {
                    base.Finished(controller, result, error);

                    switch (result)
                    {
                    case MFMailComposeResult.Cancelled:
                        Alert.Toast("Email cancelled");
                        break;

                    case MFMailComposeResult.Saved:
                        Alert.Toast("Email saved");
                        break;

                    case MFMailComposeResult.Sent:
                        Alert.Toast("Email sent");
                        break;

                    case MFMailComposeResult.Failed:
                        Log.For(this).Error("A failure occurred while completing the email");
                        break;

                    default:
                        break;
                    }

                    (UIRuntime.NativeRootScreen as UIViewController)?.DismissViewController(true, null);
                }