Beispiel #1
0
        private async void afterActions()
        {
            try
            {
                await Client.Current.RefreshCookiesAsync();
            }
            catch (Exception)
            {
                //Ignore exceptions here.
            }
            try
            {
                var ver = await VersionChecker.CheckAsync();

                if (ver is VersionChecker.GitHubRelease v)
                {
                    var dialog = new UpdateDialog(v);
                    await dialog.ShowAsync();
                }
            }
            catch (Exception)
            {
                //Ignore exceptions here.
            }
            try
            {
                await ExClient.HentaiVerse.HentaiVerseInfo.FetchAsync();
            }
            catch (Exception)
            {
                //Ignore exceptions here.
            }
            try
            {
                if (await EhTagTranslatorClient.Client.NeedUpdateAsync())
                {
                    AboutControl.UpdateETT.Execute();
                }
            }
            catch (Exception)
            {
                RootControl.RootController.SendToast(Strings.Resources.Database.EhTagTranslatorClient.Update.Failed, null);
            }
            if (DateTimeOffset.Now - EhTagClient.Client.LastUpdate > new TimeSpan(7, 0, 0, 0))
            {
                AboutControl.UpdateEhWiki.Execute();
            }
            if (DateTimeOffset.Now - BannerProvider.Provider.LastUpdate > new TimeSpan(7, 0, 0, 0))
            {
                try
                {
                    await BannerProvider.Provider.FetchBanners();
                }
                catch (Exception)
                {
                    //Ignore exceptions here.
                }
            }
        }
Beispiel #2
0
        private async void afterActions()
        {
            try
            {
                var ver = await VersionChecker.CheckAsync();

                if (ver is Windows.ApplicationModel.PackageVersion v)
                {
                    var dialog = new UpdateDialog {
                        Version = v
                    };
                    await dialog.ShowAsync();
                }
            }
            catch (Exception)
            {
                //Ignore exceptions here.
            }
            try
            {
                await ExClient.HentaiVerse.HentaiVerseInfo.FetchAsync();
            }
            catch (Exception)
            {
                //Ignore exceptions here.
            }
            if (DateTimeOffset.Now - EhTagClient.Client.LastUpdate > new TimeSpan(7, 0, 0, 0))
            {
                try
                {
                    await EhTagClient.Client.UpdateAsync();

                    RootControl.RootController.SendToast(Strings.Resources.Database.EhTagClient.Update.Succeeded, null);
                }
                catch (Exception)
                {
                    RootControl.RootController.SendToast(Strings.Resources.Database.EhTagClient.Update.Failed, null);
                }
            }
            try
            {
                if (await EhTagTranslatorClient.Client.NeedUpdateAsync())
                {
                    await EhTagTranslatorClient.Client.UpdateAsync();

                    RootControl.RootController.SendToast(Strings.Resources.Database.EhTagTranslatorClient.Update.Succeeded, null);
                }
            }
            catch (Exception)
            {
                RootControl.RootController.SendToast(Strings.Resources.Database.EhTagTranslatorClient.Update.Failed, null);
            }
            if (DateTimeOffset.Now - BannerProvider.Provider.LastUpdate > new TimeSpan(7, 0, 0, 0))
            {
                try
                {
                    await BannerProvider.Provider.FetchBanners();
                }
                catch (Exception)
                {
                    //Ignore exceptions here.
                }
            }
        }