| | |
| | | //快进滑动弹起事件; |
| | | playView.diyArcSeekBar.OnStopTrackingTouchEvent+= (sender, e) => |
| | | { |
| | | int totalSecond = (int)(playView.diyArcSeekBar.Progress * 1.0f / 100 * int.Parse(A31MusicModel.Current.functionMusic.GetAttrState("song_time"))); |
| | | //分钟 |
| | | 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()); |
| | | //int totalSecond = (int)(playView.diyArcSeekBar.Progress * 1.0f / 100 * int.Parse(A31MusicModel.Current.functionMusic.GetAttrState("song_time"))); |
| | | ////分钟 |
| | | //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); |
| | | |
| | | //Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | //dic.Add("mode", modeValueString); |
| | | //SendMethod.sendMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic); |
| | | A31MusicModel.Current.A31PlayStatus.curpos = (DateTime.Parse(time) - DateTime.Parse("00:00:00")).TotalMilliseconds.ToString(); |
| | | // A31MusicModel.Current.A31PlayStatus.curpos = (DateTime.Parse(time) - DateTime.Parse("00:00:00")).TotalMilliseconds.ToString(); |
| | | }; |
| | | ///切换播放模式点击事件; |
| | | playView.playOrderBtn.MouseUpEventHandler += (sender, e) => |
| | |
| | | //更新播放器音量给系统音量 |
| | | Volume.MusicVolume = playView.volSeekBar.Progress; |
| | | //当前播放音乐时间 |
| | | //按道理不会为空,GetAttrState("playing_time")值可能为空,强制转换int.Parse()会出现异常,不过也做了异常处理了 |
| | | int playSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState("playing_time"))+ (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds; |
| | | |
| | | int playMusicMinute = playSecond / 60; |