Ejemplo n.º 1
0
        private void OnGiveFeedbackClick(object sender, EventArgs e)
        {
            var task = new EmailComposeTask
            {
                To      = "*****@*****.**",
                Subject = "Feedback for Learn On The Go",
                Body    = LittleWatson.GetMailBody("")
            };

            task.Show();
        }
Ejemplo n.º 2
0
        public static void Init(PhoneApplicationPage page)
        {
            AddMenuItem(page, "Settings", () => page.NavigationService.Navigate(new Uri("/SettingsPage.xaml", UriKind.Relative)));

            AddMenuItem(page, "Rate and Review", () =>
            {
                new MarketplaceReviewTask().Show();
                Settings.Set(Setting.RatingDone, true);
            });

            AddMenuItem(page, "Give Feedback", () =>
            {
                new EmailComposeTask
                {
                    To      = "*****@*****.**",
                    Subject = "Feedback for Learn On The Go",
                    Body    = LittleWatson.GetMailBody("")
                }.Show();
            });

            var installationDate = Settings.GetDateTime(Setting.InstallationDate);

            if (!installationDate.HasValue)
            {
                Settings.Set(Setting.InstallationDate, DateTime.UtcNow);
            }
            else if (!Settings.GetBool(Setting.RatingDone))
            {
                if ((DateTime.UtcNow - installationDate.Value).TotalDays >= 1)
                {
                    var result = MessageBox.Show("Would you mind reviewing the Learn On The Go app?", "Rate and Review", MessageBoxButton.OKCancel);
                    if (result == MessageBoxResult.OK)
                    {
                        new MarketplaceReviewTask().Show();
                    }
                    Settings.Set(Setting.RatingDone, true);
                }
            }
        }