Ejemplo n.º 1
0
        private static async Task <List <LocalLibraryBase> > Load()
        {
            var ret           = new List <LocalLibraryBase>();
            var customFolders = await StoreFolderLocalLibrary.InitLibraries();

            ret.AddRange(customFolders);
            return(ret);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns>the user-selected folder, if any, or null otherwise</returns>
        private async Task <StorageFolder> LetUserSelectFolder()
        {
            // file pickers do not work in snapped mode
            if (EnsureUnsnapped())
            {
                var picker = new FolderPicker();
                picker.SuggestedStartLocation = PickerLocationId.ComputerFolder;
                picker.FileTypeFilter.Add(".mp3");
                var folder = await picker.PickSingleFolderAsync();

                if (folder != null)
                {
                    StoreFolderLocalLibrary.Save(folder);
                }
                return(folder);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
 public void Remove(StoreLocalLibraryBase library)
 {
     StoreFolderLocalLibrary.Remove(library.RootFolder);
     Libraries.Remove(library);
     Reset();
 }