SongsTable.cs 800 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace MusicPlayer
  8. {
  9. class SongsTable : DataTable
  10. {
  11. public SongsTable() : base()
  12. {
  13. this.Columns.Clear();
  14. this.Columns.Add("Naam", typeof(string));
  15. this.Columns.Add("Album", typeof(string));
  16. this.Columns.Add("Artiest", typeof(string));
  17. this.Columns.Add("Genre", typeof(string));
  18. this.Columns.Add("Duration", typeof(string));
  19. this.Columns.Add("song", typeof(Song));
  20. }
  21. public void Add(Song s)
  22. {
  23. this.Rows.Add(s.Name, s.Album, s.Artist, s.Genre, Main.SecondsToTimestamp(s.Seconds), s);
  24. }
  25. }
  26. }