示例#1
0
        private void GetSelectedVoice(UiNotificationService uiNotificationService, ApplicationDataContainer roamingSettings)
        {
            Dictionary <string, VoiceModel> voices = Helpers.SupportedVoices.ToDictionary(v => v.Id);

            if (roamingSettings.Values[RoamingData.SelectedVoice] is string selectedVoice && voices.TryGetValue(selectedVoice, out VoiceModel voice))
            {
                uiNotificationService.SelectedVoice = selectedVoice;
            }
示例#2
0
        private async void DismissedEventHandler(SplashScreen sender, object args)
        {
            dismissed = true;

            (Application.Current as App).ServiceProvider = await GetServiceProvider(new ServiceCollection());


            IRulesCache cache = (Application.Current as App).ServiceProvider.GetRequiredService <IRulesCache>();

            UiNotificationService uiNotificationService = (Application.Current as App).ServiceProvider.GetRequiredService <UiNotificationService>();

            GetSelectedVoice(uiNotificationService, ApplicationData.Current.RoamingSettings);
            uiNotificationService.HasAdFree = await StoreAccessHelper.Instance.CheckIfUserHasAdFreeSubscriptionAsync();

            DismissExtendedSplash();
        }