Inheritance: BindableBase, IDisposable
コード例 #1
0
        public async Task InitVideoVM()
        {
            // default video folder
            if (App.LocalSettings.ContainsKey("DefaultVideoFolder"))
            {
                StorageFolder customDefaultVideoFolder = await StorageApplicationPermissions.FutureAccessList.GetFolderAsync(
                    App.LocalSettings["DefaultVideoFolder"].ToString());

                VideoVM = new VideoLibraryViewModel(customDefaultVideoFolder);
            }
            else
            {
                VideoVM = new VideoLibraryViewModel(KnownVLCLocation.VideosLibrary);
            }

            await VideoVM.GetMedia();

            MusicLibraryVm = Locator.MusicLibraryVM;
            await MusicLibraryVm.Initialize();

#if NETFX_CORE
            ExternalStorageVM = new ExternalStorageViewModel();
            await ExternalStorageVM.Initialize();
#endif
        }
コード例 #2
0
ファイル: MainPageViewModel.cs プロジェクト: kusl/vlcwinrt
        public async Task InitVideoVM()
        {
            // default video folder
            if (App.LocalSettings.ContainsKey("DefaultVideoFolder"))
            {
                StorageFolder customDefaultVideoFolder = await StorageApplicationPermissions.FutureAccessList.GetFolderAsync(
                        App.LocalSettings["DefaultVideoFolder"].ToString());
                VideoVM = new VideoLibraryViewModel(customDefaultVideoFolder);
            }
            else
            {
                VideoVM = new VideoLibraryViewModel(KnownVLCLocation.VideosLibrary);
            }

            await VideoVM.GetMedia();

            MusicLibraryVm = Locator.MusicLibraryVM;
            await MusicLibraryVm.Initialize();

#if NETFX_CORE
            ExternalStorageVM = new ExternalStorageViewModel();
            await ExternalStorageVM.Initialize();
#endif
        }