Exemplo n.º 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;
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
 public ArtistOrSong(string _name, byte _difference, Song _sourceSong)
 {
     Name = _name;
     Difference = _difference;
     sourceSong = _sourceSong;
 }
Exemplo n.º 4
0
 private Artist(string name, Song firstSong)
 {
     PathToIcon = "Assets/artist.png";
     Name = name;
     Artists.Add(this);
 }
Exemplo n.º 5
0
 private void SelectionChanged(Song song)
 {
     listArtistsControl.Visibility = Visibility.Collapsed;
     songTextControl.Visibility = Visibility.Visible;
 }
Exemplo n.º 6
0
 public static string GetTextOfSong(Song song)
 {
     return resourse.GetString(song.FullName);
 }