Exemple #1
0
        public MainPage()
        {
            InitializeComponent();
            string path = File.ReadAllText("folders.mus");

            d = new DatabaseBuilder(path);
        }
Exemple #2
0
        private void changeFolder_Button_click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog browser = new FolderBrowserDialog();
            DialogResult        result  = browser.ShowDialog();

            if (result == DialogResult.OK)
            {
                string path = browser.SelectedPath;
                File.WriteAllText("folders.mus", path);
                (App.Current as App).player.Close();
                (App.Current as App).initializer();
                DatabaseBuilder D = new DatabaseBuilder(path);
                Task            t = Task.Factory.StartNew(() => D.createDatabase())
                                    .ContinueWith(ignore => loadArtists())
                                    .ContinueWith(ignore => loadAlbums())
                                    .ContinueWith(ignore => loadGenre())
                                    .ContinueWith(ignore => loadSongs())
                                    .ContinueWith(ignore => { int a = 5; });
                //t.Wait();
            }
        }