public BitmapSource GetCatalogueCover() { Random r = new Random(); int failTime = 0; MusicEntity randomed = Entities[r.Next(0, Entities.Count)]; BitmapSource bs; while ((bs = MediaMetaDataReader.GetPicture(randomed.Path)) == null && failTime < 3) { failTime++; } return(bs); }
private void DipMusic_ItemSelectionChanged(MusicEntity selected, object tag) { if (laudio.Playing) { laudio.Stop(); } BitmapSource source; ControlPanel.AlbumProfile = (source = MediaMetaDataReader.GetPicture(selected.Path)) == null ? null : new ImageBrush(source); laudio.Load(selected); ControlPanel.StartPlaying(); laudio.Play(); //if (dia == null) //{ // dia = new Dialogue(new _3DVisualize(), "3D"); // dia.Show(); //} }