Beispiel #1
0
        public async Task ShowLatestUpdateNotice()
        {
            var text = await Models.Helpers.AppUpdateNotice.GetUpdateNoticeAsync();

            var dialog = new Dialogs.MarkdownTextDialog("更新情報");

            dialog.Text = text;
            dialog.PrimaryButtonText = "OK";

            try
            {
                var addon = await Models.Purchase.HohoemaPurchase.GetAvailableCheersAddOn();

                var product = addon.ProductListings.FirstOrDefault(x => Models.Purchase.HohoemaPurchase.ProductIsActive(x.Value));

                if (product.Value != null)
                {
                    dialog.SecondaryButtonText   = "開発支援について確認する";
                    dialog.SecondaryButtonClick += async(_, e) =>
                    {
                        await Models.Purchase.HohoemaPurchase.RequestPurchase(product.Value);
                    };
                }
            }
            catch { }

            await dialog.ShowAsync();
        }
Beispiel #2
0
        public async Task ShowLatestUpdateNotice()
        {
            var text = await Models.Helpers.AppUpdateNotice.GetUpdateNoticeAsync();

            var dialog = new Dialogs.MarkdownTextDialog("UpdateNotice".Translate());

            dialog.Text = text;
            dialog.PrimaryButtonText = "Close".Translate();

            await dialog.ShowAsync();
        }
Beispiel #3
0
        public async Task ShowUpdateNoticeAsync(Version version)
        {
            var allVersions = await Models.Helpers.AppUpdateNotice.GetUpdateNoticeAvairableVersionsAsync();

            var versions = allVersions.Where(x => x.Major == version.Major && x.Minor == version.Minor).ToList();
            var text     = await Models.Helpers.AppUpdateNotice.GetUpdateNotices(versions);

            var dialog = new Dialogs.MarkdownTextDialog($"v{version.Major}.{version.Minor} 更新情報 一覧");

            dialog.Text = text;
            dialog.PrimaryButtonText = "OK";
            await dialog.ShowAsync();
        }
Beispiel #4
0
        public async Task <bool> ShowAcceptCacheUsaseDialogAsync(bool showWithoutConfirmButton = false)
        {
            var dialog = new Dialogs.MarkdownTextDialog("HohoemaCacheVideoFairUsePolicy".Translate());


            var file = await StorageFile.GetFileFromPathAsync(CacheUsageConfirmationFileUri);

            dialog.Text = await FileIO.ReadTextAsync(file);

            if (!showWithoutConfirmButton)
            {
                dialog.PrimaryButtonText   = "Accept".Translate();
                dialog.SecondaryButtonText = "Cancel".Translate();
            }
            else
            {
                dialog.PrimaryButtonText = "Close".Translate();
            }

            var result = await dialog.ShowAsync();

            return(result == Windows.UI.Xaml.Controls.ContentDialogResult.Primary);
        }
Beispiel #5
0
        public async Task <bool> ShowAcceptCacheUsaseDialogAsync(bool showWithoutConfirmButton = false)
        {
            var dialog = new Dialogs.MarkdownTextDialog("キャッシュ機能の利用に関する確認");


            var file = await StorageFile.GetFileFromPathAsync(CacheUsageConfirmationFileUri);

            dialog.Text = await FileIO.ReadTextAsync(file);

            if (!showWithoutConfirmButton)
            {
                dialog.PrimaryButtonText   = "同意する";
                dialog.SecondaryButtonText = "キャンセル";
            }
            else
            {
                dialog.PrimaryButtonText = "閉じる";
            }

            var result = await dialog.ShowAsync();

            return(result == Windows.UI.Xaml.Controls.ContentDialogResult.Primary);
        }