Beispiel #1
0
        private async void HomeView_Appearing(object sender, EventArgs e)
        {
            IFolderBrowser folderBrowser = DependencyService.Get <IFolderBrowser>();
            CatalogScaner  scaner        = new CatalogScaner();

            scaner.ScanFolder(folderBrowser.FolderPath);
            ((HomeViewModel)this.DataContext).UpdateCollections(scaner.ScannedFiles);
        }
Beispiel #2
0
        private void ScanMusic()
        {
            CatalogScaner catalogScaner = new CatalogScaner();
            List <string> files         = new List <string>();

            if (File.Exists("catalogs.jar"))
            {
            }
            else
            {
                catalogScaner.ScanFolder(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic));
            }


            foreach (var a in catalogScaner.ScannedFiles)
            {
                files.Add(a);
            }

            var vm = (HomeViewModel)this.DataContext;

            vm.UpdateCollections(files);
        }