Exemplo n.º 1
0
        public static void AddNewSong(string name, string artist = null, string tuning = null, Difficulty difficulty = Difficulty.Null)
        {
            Song songToAdd = (new Song(name, IDForNextSong, artist, tuning, difficulty));

            songToAdd.DateTimeLastPracticed = DateTime.Parse("01/01/0001 01:00:00");
            ListOfSongs.Add(songToAdd);
            IDForNextSong++;
        }
Exemplo n.º 2
0
        public static void LoadSong(string name, string artist, string tuning, Difficulty difficulty, DateTime timeLastPracticed, BindingList <string> comments)
        {
            Song songToLoad = new Song(name, IDForNextSong, artist, tuning, difficulty);

            songToLoad.DateTimeLastPracticed = timeLastPracticed;
            foreach (string comment in comments)
            {
                songToLoad.Comments.Add(comment);
            }
            ListOfSongs.Add(songToLoad);
            IDForNextSong++;
        }
Exemplo n.º 3
0
 public static void DeleteSong(Song songToDelete)
 {
     ListOfSongs.Remove(songToDelete);
 }
Exemplo n.º 4
0
 public static Song FindSongByID(int id)
 {
     return(ListOfSongs.SingleOrDefault(song => song.ID == id));
 }