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