private void EmailPdfFile(string pdfFile) { // Give Feedback var mailer = new EmailComposer(); if (MFMailComposeViewController.CanSendMail) { string[] strArray = new String[3]; strArray [0] = pdfFile; strArray [1] = "application/pdf"; strArray [2] = "pdfFile.pdf"; mailer.Attachments = strArray; mailer.PresentViewController(this); } else { new UIAlertView("No mail account", "Please set up a Mail account in order to send a mail.", null, "Ok", null).Show(); } }
void HandleSettingRowSelectedEvent(NSIndexPath indexPath) { if (indexPath.Section == 0) { if (indexPath.Row == 0) { HidePopovers(); settingViewController.Dispose(); settingViewController = null; // Server Setting OpenSelectServer(); } } else { HidePopovers(); if (indexPath.Row == 0) { // About eBriefing CustomNavigationController navController = new CustomNavigationController(); navController.NavigationBar.TintColor = UIColor.White; navController.SetViewControllers(new UIViewController[] { new AboutViewController() }, false); AppDelegate.Current.Nav.PresentViewController(navController, true, null); } else if (indexPath.Row == 1) { // Tutorial ShowTutorial(true, false, true); } // else if (indexPath.Row == 2) // { // // Privacy Policy // PrivacyPolicyViewController ppvc = new PrivacyPolicyViewController(); // ppvc.DismissEvent += delegate // { // this.DismissCurrentPopinControllerAnimated(true); // }; // ppvc.View.Frame = new CGRect(0, 0, 646, 600); // ppvc.SetPopinTransitionStyle(BKTPopinTransitionStyle.SpringySlide); // ppvc.SetPopinOptions(BKTPopinOption.Default); // ppvc.SetPopinTransitionDirection(BKTPopinTransitionDirection.Top); // this.PresentPopinController(ppvc, true, null); // } else if (indexPath.Row == 2) { if (MFMailComposeViewController.CanSendMail) { // Give Feedback mailer = new EmailComposer(); mailer.Recipient = "*****@*****.**"; mailer.Subject = "eBriefing Feedback (iOS)"; mailer.Body = "eBriefing App Version: " + Settings.AppVersion + "\niOS Version: " + Constants.Version + "\niOS Device: " + UIDevice.CurrentDevice.Model + "\n\nDescription of Problem, Concern, or Question:"; mailer.PresentViewController(this); } else { new UIAlertView("No mail account", "Please set up a Mail account in order to send a mail.", null, "Ok", null).Show(); } } else { // Rate This App MTiRate.iRate.SharedInstance.PromptForRating(); } } }