Ejemplo n.º 1
0
        private void Window_ContentRendered(object sender, EventArgs e)
        {
            //base.OnContentRendered(e);
            MainWindow t = this.Owner as MainWindow;
            tempds = new Database.SongCollection();
            ds = t.AudioEngine.Datastore;
            this.DataContext = ds;
            this.cbDirectory.Items.Clear();

            this.PopulateDirectories();
        }
Ejemplo n.º 2
0
        private void btnSaveClick(object sender, RoutedEventArgs e)
        {

            if (this.tempds.Count > 0)
            {
                Database.SongCollection songs = new Database.SongCollection();

                foreach (Database.Song row in this.tempds)
                {
                    songs.Add(row);
                }

                ds.Songs.Update(songs);
            }
        }
Ejemplo n.º 3
0
        private void btnApplyClick(object sender, RoutedEventArgs e)
        {
            Tokenizer t = new Tokenizer();

            string path = txtPath.Text;
            string file = txtFile.Text;

            path = path.Replace("\\", "\\\\");
            path = path.Replace("(", "\\(");
            path = path.Replace(")", "\\)");

            //Fixme: figure out how to use list as a defaultview

            Database.SongCollection songs = new Database.SongCollection();

            foreach (Database.Song row in this.tempds)
            {
                songs.Add(row);
            }

            //DataTable dt = ds.ToDataTable<Database.Song>(songs);

            t.Toke(songs, path, file);
        }