private void HiddenPlayList_ItemClick(object sender, ItemClickEventArgs e) { PlayingSongForSqlModel model = e.ClickedItem as PlayingSongForSqlModel; for (int i = 0; i < PlayingBarVm.PlayingList.Count; i++) { if (model.Id == PlayingBarVm.PlayingList[i].Id) { PlayingBarVm.CurIndex = i; PlayingBarVm.CurrentPlayingSong = PlayingBarVm.PlayingList[i]; } } SetMediaSource(); RenderPlayList(); }
internal void CreatePlayListItem(PlayingSongForSqlModel model) { using (var statement = conn.Prepare(SQL_INSERT_PLAYLIST)) { //这里的Bind会依次替换掉上面语句中的问号 statement.Bind(1, model.Id); statement.Bind(2, model.PicUrl); statement.Bind(3, model.Url); statement.Bind(4, model.Name); statement.Bind(5, model.Artist); statement.Bind(6, model.Duration.ToString()); statement.Bind(7, model.Like); statement.Bind(8, model.Playing); statement.Bind(9, model.AlName); statement.Bind(10, model.Lyric); statement.Step(); } }