private void _DelBgm() { if (SelectedBangumi != null) { DbModel.番组.Remove(SelectedBangumi); BgmList.Remove(SelectedBangumi); DbModel.SaveChanges(); } }
/// <summary> /// Play the background music. /// </summary> /// <param name="songName">BGM name.</param> public void PlayBgm(string songName) { BgmList.ForEach(song => { if (song.musicName.Equals(songName)) { PlayBgm(song); } }); }
private void _DropBgm(object o) { var code = (string)o; var bgm = VM番组.解析信息(code, new 番组()); bgm.Bangumi编号 = code; DbModel.番组.Add(bgm); DbModel.SaveChanges(); BgmList.Add(bgm); }