예제 #1
0
        private void PageLoaded(object sender, RoutedEventArgs e)
        {
            if (_ratingPrompted)
            {
                return;
            }
            _ratingPrompted = true;

            int launches;

            IsolatedStorageSettings.ApplicationSettings.TryGetValue("AppLaunches", out launches);

            int nextRatingPrompt;

            if (!IsolatedStorageSettings.ApplicationSettings.TryGetValue("NextRatingPrompt", out nextRatingPrompt))
            {
                nextRatingPrompt = DefaultNextRatingPrompt;
            }

            if (launches >= nextRatingPrompt)
            {
                IsolatedStorageSettings.ApplicationSettings["NextRatingPrompt"] = nextRatingPrompt * 2;

                NotificationBox.ShowAgain(
                    "Enjoying?",
                    "Would you like to review this application?",
                    "Ask me later",
                    false,
                    surpressed => { },
                    "RatingMsgPrompt",
                    new NotificationBoxCommand("Yes", () => new MarketplaceReviewTask().Show()),
                    new NotificationBoxCommand("No", () => {}));
            }
            IsolatedStorageSettings.ApplicationSettings["AppLaunches"] = ++launches;
        }
예제 #2
0
 private static void ShowLoginHelp()
 {
     NotificationBox.ShowAgain(
         "Problems?",
         "If your credentials are not being saved, please uninstall and install application again. " +
         "For further assistance, please contact Support.",
         false,
         surpressed => { },
         "LoginMsgPrompt",
         new NotificationBoxCommand("Ok", () => { }));
 }