Пример #1
0
 public static Artist GetOrAddArtist(string name, Song song)
 {
     Artist result;
     if (Artists.Exists(a => a.Name == name))
     {
         result = Artists.First(a => a.Name == name);
     }
     else
     {
         result = new Artist(name, song);
     }
     result.SongsOfArtist.Add(song);
     return result;
 }
Пример #2
0
 public void ShowSong(Song song)
 {
     textControl.ClearText();
     XDocument doc = XDocument.Parse(song.Text);
     if (song.FullName == "Сплин - Мое сердце")
     {
         textControl.PlayMusic();
     }
     foreach (XElement xElm in doc.Root.Descendants("string"))
     {
         var s = xElm.Value;
         string extraS = (string)xElm.Attribute("accord");
         textControl.AddLine(s, extraS);
     }
 }
Пример #3
0
 public ArtistOrSong(string _name, byte _difference, Song _sourceSong)
 {
     Name = _name;
     Difference = _difference;
     sourceSong = _sourceSong;
 }
Пример #4
0
 private Artist(string name, Song firstSong)
 {
     PathToIcon = "Assets/artist.png";
     Name = name;
     Artists.Add(this);
 }
Пример #5
0
 private void SelectionChanged(Song song)
 {
     listArtistsControl.Visibility = Visibility.Collapsed;
     songTextControl.Visibility = Visibility.Visible;
 }
Пример #6
0
 public static string GetTextOfSong(Song song)
 {
     return resourse.GetString(song.FullName);
 }