示例#1
0
        private async Task CallRateReminder()
        {
            RatePopup.RateButtonText   = Strings.YesLabel;
            RatePopup.CancelButtonText = Strings.NotNowLabel;
            RatePopup.Title            = Strings.RateReminderTitle;
            RatePopup.Content          = Strings.RateReminderText;

            await RatePopup.CheckRateReminderAsync();
        }
示例#2
0
        internal static async Task ShowIfAppropriateAsync()
        {
            RatePopup.RateButtonText   = Strings.YesLabel;
            RatePopup.CancelButtonText = Strings.NotNowLabel;
            RatePopup.Title            = Strings.RateReminderTitle;
            RatePopup.Content          = Strings.RateReminderText;

            await RatePopup.CheckRateReminderAsync();
        }
示例#3
0
 private void RateHandler()
 {
     RatePopup.LaunchLimit            = 5;
     RatePopup.ResetCountOnNewVersion = false;
     RatePopup.RateButtonText         = "avaliar";
     RatePopup.CancelButtonText       = "não";
     RatePopup.Title   = "Recife Mobi está sendo útil?";
     RatePopup.Content = "Percebemos que você já utilizou o Recife Mobi algumas vezes. Se ele está sendo útil, que tal avaliar ele na Windows Store?" +
                         "\nLeva menos de um minuto. ;)";
     RatePopup.CheckRateReminderAsync();
 }
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (e.PrelaunchActivated == false)
            {
                if (rootFrame.Content == null)
                {
                    // When the navigation stack isn't restored navigate to the first page,
                    // configuring the new page by passing required information as a navigation
                    // parameter
                    rootFrame.Navigate(typeof(MainPage), e.Arguments);
                }
                // Ensure the current window is active
                Window.Current.Activate();
            }
            RatePopup.LaunchLimit            = 20;
            RatePopup.ResetCountOnNewVersion = false;
            RatePopup.RateButtonText         = "rate now";
            RatePopup.CancelButtonText       = "not now";
            RatePopup.Title   = "Rate App";
            RatePopup.Content = "Would you like to rate this app?";
            RatePopup.CheckRateReminderAsync();
            RatePopup.ResetLaunchCount();
        }
示例#5
0
        public static async Task CheckShowRateReminder()
        {
            RatePopup.LaunchLimit            = 10;
            RatePopup.ResetCountOnNewVersion = true;
            RatePopup.RateButtonText         = "RatePopup_RateButtonText".GetLocalized();
            RatePopup.CancelButtonText       = "RatePopup_CancelButtonText".GetLocalized();
            RatePopup.Title   = "RatePopup_Title".GetLocalized();
            RatePopup.Content = "RatePopup_Content".GetLocalized();
            var result = await RatePopup.CheckRateReminderAsync();

            if (result == RateReminderResult.Dismissed)
            {
                FeedbackPopup.ContactEmail           = "*****@*****.**";
                FeedbackPopup.EmailSubject           = "FeedbackPopup_EmailSubject".GetLocalized();
                FeedbackPopup.Title                  = "FeedbackPopup_Title".GetLocalized();
                FeedbackPopup.Content                = "FeedbackPopup_Content".GetLocalized();
                FeedbackPopup.SendFeedbackButtonText = "FeedbackPopup_SendFeedbackButtonText".GetLocalized();
                FeedbackPopup.CancelButtonText       = "FeedbackPopup_CancelButtonText".GetLocalized();
                await FeedbackPopup.ShowFeedbackDialogAsync();
            }
        }
示例#6
0
        private async Task CheckRateReminderAsync()
        {
            RatePopup.LaunchLimit            = 1;
            RatePopup.ResetCountOnNewVersion = false;
            RatePopup.RateButtonText         = "rate";
            RatePopup.CancelButtonText       = "cancel";
            RatePopup.Title   = "Rate app";
            RatePopup.Content = "Would you like to rate this app?";

            if (await RatePopup.CheckRateReminderAsync() == RateReminderResult.Dismissed)
            {
                FeedbackPopup.ContactEmail = "*****@*****.**";
                FeedbackPopup.EmailSubject = "Feedback for my app";
                FeedbackPopup.EmailBody    = "Default body";

                FeedbackPopup.Title   = "Would you like to send feedback?";
                FeedbackPopup.Content = "Maybe you want to send us an email with feedback regarding your experience with the app?";
                FeedbackPopup.SendFeedbackButtonText = "yes, send feedback";
                FeedbackPopup.CancelButtonText       = "no, thanks";

                await FeedbackPopup.ShowFeedbackDialogAsync();
            }
        }
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override async void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                //this.DebugSettings.EnableFrameRateCounter = true;
            }
#endif
            Frame rootFrame = Window.Current.Content as Frame;
            WinSecureStorageBase.StoragePassword = "******";

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (e.PrelaunchActivated == false)
            {
                if (rootFrame.Content == null)
                {
                    await SetStatusBarVisibility();
                    await RegisterGithubNotificationsBackgroundTask();
                    await RegisterMarkNotificationAsReadBackgroundTask();

                    var setup = new Setup(rootFrame);
                    setup.Initialize();

                    var start = Mvx.Resolve <MvvmCross.Core.ViewModels.IMvxAppStart>();
                    start.Start();
                }
                // Ensure the current window is active
                Window.Current.Activate();
                AuthenticationService.Authenticate();

                //Ask user to rate app
                RatePopup.Title = "Rate GitIt!";
                var result = await RatePopup.CheckRateReminderAsync();

                if (result == RateReminderResult.Dismissed)
                {
                    FeedbackPopup.ContactEmail           = "*****@*****.**";
                    FeedbackPopup.EmailSubject           = "Feedback for GitIt";
                    FeedbackPopup.EmailBody              = "";
                    FeedbackPopup.Title                  = "Would you like to send feedback?";
                    FeedbackPopup.Content                = "Maybe you want to send me an email with feedback regarding your experience with GitIt?";
                    FeedbackPopup.SendFeedbackButtonText = "yes, send feedback";
                    FeedbackPopup.CancelButtonText       = "no, thanks";
                    await FeedbackPopup.ShowFeedbackDialogAsync();
                }
            }
        }