| | |
| | | ///加载播放音乐界面的控件方法 |
| | | playView.viewFrameLayout(middLayout); |
| | | #endregion |
| | | |
| | | |
| | | //快进滑动事件; |
| | | EventHandler<int> seekClick = (sender, e) => |
| | | { |
| | | int totalSecond = (int)(playView.diyArcSeekBar.Progress * 1.0f / 100 * int.Parse(A31MusicModel.Current.A31PlayStatus.totlen) / 1000); |
| | | //分钟 |
| | | int Minute = totalSecond / 60; |
| | | //秒钟 |
| | | int Second = totalSecond % 60; |
| | | string time = "00" + ":" + (Minute.ToString().Length < 2 ? "0" + Minute.ToString() : Minute.ToString()) + ":" + (Second.ToString().Length < 2 ? "0" + Second.ToString() : Second.ToString()); |
| | | SendMethod.Seek(time, A31MusicModel.Current); |
| | | A31MusicModel.Current.A31PlayStatus.curpos = (DateTime.Parse(time) - DateTime.Parse("00:00:00")).TotalMilliseconds.ToString(); |
| | | }; |
| | | //playView.diyArcSeekBar.OnProgressChangedEvent += seekClick; |
| | | playView.diyArcSeekBar.OnStopTrackingTouchEvent += seekClick;//快进滑动不发命令, |
| | | |
| | | ///切换播放模式点击事件; |
| | | playView.playOrderBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | |
| | | //if (A31MusicModel.Current.A31PlayStatus.IsMute) |
| | | //{ |
| | | // btnMute.IsSelected = true;//静音图标 |
| | | // // btnMute.IsSelected = true;//静音图标 |
| | | // playView.volSeekBar.Progress = 0; |
| | | //} |
| | | //else |
| | | //{ |
| | | // btnMute.IsSelected = false;//静音图标 |
| | | // // btnMute.IsSelected = false;//静音图标 |
| | | // if (1000 < (DateTime.Now - A31MusicModel.ProgressDateTime).TotalMilliseconds) |
| | | // { |
| | | // //声音进度条; |
| | |
| | | if (totalSecond == 0) |
| | | { |
| | | //歌曲进度条 |
| | | //playView.volSeekBar.Progress = 0; |
| | | playView.diyArcSeekBar.Progress = 0; |
| | | } |
| | | else |
| | | { |
| | | //歌曲进度条 |
| | | //playView.volSeekBar.Progress = (int)(playSecond * 100.0 / totalSecond);//+1 |
| | | playView.diyArcSeekBar.Progress = (int)(playSecond * 100.0 / totalSecond);//+1 |
| | | } |
| | | |
| | | } |