Ejemplo n.º 1
0
        private async Task RefreshCacheSaveFolderStatus()
        {
            var cacheFolderAccessState = await CacheSaveFolder.GetVideoCacheFolderState();

            CacheSaveFolderPath.Value = "";
            switch (cacheFolderAccessState)
            {
            case CacheFolderAccessState.NotAccepted:
                CacheFolderStateDescription.Value = "CacheFolderAccessState.NotAccepted_Desc".Translate();
                break;

            case CacheFolderAccessState.NotEnabled:
                CacheFolderStateDescription.Value = "CacheFolderAccessState.NotEnabled_Desc".Translate();
                break;

            case CacheFolderAccessState.NotSelected:
                CacheFolderStateDescription.Value = "CacheFolderAccessState.NotSelected_Desc".Translate();
                break;

            case CacheFolderAccessState.SelectedButNotExist:
                CacheFolderStateDescription.Value = "CacheFolderAccessState.SelectedButNotExist_Desc".Translate();
                CacheSaveFolderPath.Value         = "?????";
                break;

            case CacheFolderAccessState.Exist:
                CacheFolderStateDescription.Value = "ReadyForVideoCache".Translate();
                break;

            default:
                break;
            }

            var folder = await CacheSaveFolder.GetVideoCacheFolder();

            if (folder != null)
            {
                CacheSaveFolderPath.Value = $"{folder.Path}";
            }


            IsRequireUpdateCacheSaveFolder.Value =
                cacheFolderAccessState == CacheFolderAccessState.SelectedButNotExist ||
                cacheFolderAccessState == CacheFolderAccessState.NotSelected
            ;
        }
Ejemplo n.º 2
0
        private async Task RefreshCacheSaveFolderStatus()
        {
            var cacheFolderAccessState = await CacheSaveFolder.GetVideoCacheFolderState();

            CacheSaveFolderPath.Value = "";
            switch (cacheFolderAccessState)
            {
            case CacheFolderAccessState.NotAccepted:
                CacheFolderStateDescription.Value = "キャッシュ利用の同意が必要です。 「キャッシュを有効にする」ボタンを押すと同意文書が表示されます。";
                break;

            case CacheFolderAccessState.NotEnabled:
                CacheFolderStateDescription.Value = "キャッシュの有効化が必要です";
                break;

            case CacheFolderAccessState.NotSelected:
                CacheFolderStateDescription.Value = "フォルダを選択するとキャッシュ機能が使えるようになります";
                break;

            case CacheFolderAccessState.SelectedButNotExist:
                CacheFolderStateDescription.Value = "選択されたフォルダが確認できません。外付けストレージを再接続するか、キャッシュ先フォルダを再選択してください。";
                CacheSaveFolderPath.Value         = "?????";
                break;

            case CacheFolderAccessState.Exist:
                CacheFolderStateDescription.Value = "キャッシュ利用の準備ができました";
                break;

            default:
                break;
            }

            var folder = await CacheSaveFolder.GetVideoCacheFolder();

            if (folder != null)
            {
                CacheSaveFolderPath.Value = $"{folder.Path}";
            }


            IsRequireUpdateCacheSaveFolder.Value =
                cacheFolderAccessState == CacheFolderAccessState.SelectedButNotExist ||
                cacheFolderAccessState == CacheFolderAccessState.NotSelected
            ;
        }