public void RemoveMusic(Model.Music music) { XML.MediaXML mediaXML = new XML.MediaXML(); mediaXML.Load("musics.xml"); mediaXML.Remove(music.Path); mediaXML.WriteInFile("musics.xml"); String namePathFile = music.Path; Musics.Remove(music); var medias = from media in MusicsTmp where media.Path.Contains(namePathFile) select media; var selected = music; foreach (var media in medias) { selected = media; } MusicsTmp.Remove(selected); }
public void UnsetDefaultMusic() { Musics.Remove(DefaultMusic); DefaultMusic = null; }