| | |
| | | else |
| | | { |
| | | clearA31Threads(); |
| | | verticalRefresh.RemoveAll(); |
| | | //verticalRefresh.RemoveAll(); |
| | | for (int i = 0; i < A31MusicModel.A31MusicModelList.Count; i++) |
| | | { |
| | | var a31player = A31MusicModel.A31MusicModelList[i]; |
| | |
| | | { |
| | | musicView.playBtn.IsSelected = false; |
| | | } |
| | | EventHandler<MouseEventArgs> clickPlay = (sender, e) => |
| | | { |
| | | A31MusicModel.Current = a31player;//当前播放器 |
| | | musicView.clickBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | A31MusicModel.Current = a31player;//当前播放器 |
| | | var a31PlayMusicPage = new A31PlayMusicPage(); |
| | | MainPage.BasePageView.AddChidren(a31PlayMusicPage); |
| | | a31PlayMusicPage.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | musicView.singerBtn.MouseUpEventHandler += clickPlay; |
| | | musicView.songNameBtn.MouseUpEventHandler += clickPlay; |
| | | musicView.musicNameBtn.MouseUpEventHandler += clickPlay; |
| | | musicView.regionBtn.MouseUpEventHandler += clickPlay; |
| | | MainPage.BasePageView.AddChidren(a31PlayMusicPage); |
| | | a31PlayMusicPage.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | ///上一曲点击事件 |
| | | musicView.prevBtn.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | musicView.prevBtn.IsSelected = true; |
| | | SendMethod.Previous(); |
| | | SendMethod.Previous(a31player); |
| | | }; |
| | | musicView.prevBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | if (musicView.playBtn.IsSelected) |
| | | { |
| | | musicView.playBtn.IsSelected = false; |
| | | SendMethod.Pause(); |
| | | A31MusicModel.Current.A31PlayStatus.status = "pause"; |
| | | SendMethod.Pause(a31player); |
| | | a31player.A31PlayStatus.status = "pause"; |
| | | } |
| | | else |
| | | { |
| | | musicView.playBtn.IsSelected = true; |
| | | SendMethod.Play(); |
| | | A31MusicModel.Current.A31PlayStatus.status = "play"; |
| | | SendMethod.Play(a31player); |
| | | a31player.A31PlayStatus.status = "play"; |
| | | } |
| | | }; |
| | | ///下一曲点击事件 |
| | | musicView.nextBtn.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | musicView.nextBtn.IsSelected = true; |
| | | SendMethod.Next(); |
| | | SendMethod.Next(a31player); |
| | | }; |
| | | musicView.nextBtn.MouseUpEventHandler += (sender, e) => |
| | | { |