HDL_ON/DAL/Server/HttpUtil.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicFileList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@ /// 固定域名,正式环境 /// 公共域名就近解析 /// </summary> public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicFileList.cs
@@ -59,9 +59,9 @@ public void FileView() { middViewLayout.RemoveAll(); for (int i = 0; i < A31MusicModel.Current.palyListInfos.Count; i++) for (int i = 0; i < A31MusicModel.Current.palyLists.Count; i++) { var list = A31MusicModel.Current.palyListInfos[i]; var list = A31MusicModel.Current.palyLists[i]; RowLayout addFlieRow = new RowLayout { Height = Application.GetRealHeight(104), HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs
@@ -180,7 +180,7 @@ /// <summary> /// 列表 /// </summary> public List<PalyListInfo> palyListInfos = new List<PalyListInfo>(); public List<PalyList> palyLists = new List<PalyList>(); /// <summary> /// 喜爱音乐列表 @@ -277,7 +277,7 @@ /// <returns></returns> public List<Songs> GetSongList(string listName) { var list = palyListInfos.Find((o)=>o.group==listName); var list = palyLists.Find((o)=>o.group==listName); if (list==null) { return new List<Songs>(); } @@ -361,11 +361,28 @@ public string version = string.Empty; public string uuid = string.Empty; } [System.Serializable] /// <summary> /// 支持多个音乐 /// </summary> public class PalyListInfo { /// <summary> /// 音乐sid /// </summary> public string sid = string.Empty; /// <summary> /// 解释多个音乐 /// </summary> public List<PalyList> playlist = new List<PalyList>(); } [System.Serializable] /// <summary> /// 列表信息 /// </summary> public class PalyListInfo public class PalyList { /// <summary> /// 列表名 HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicSourcePage.cs
@@ -184,7 +184,7 @@ { try { if (A31MusicModel.Current.palyListInfos.Count == 0) if (A31MusicModel.Current.palyLists.Count == 0) { SendMethod.sendMethod.GetPalyList(A31MusicModel.Current.functionMusic); HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -85,18 +85,18 @@ //快进滑动弹起事件; 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) => @@ -418,7 +418,8 @@ } //更新播放器音量给系统音量 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; HDL_ON/UI/UI2/FuntionControlView/Music/A31SongPlay.cs
@@ -53,7 +53,7 @@ } UI.Music.View.SongView songView = new UI.Music.View.SongView(); songView.SongFrameLayout(vv, songs); songView.singerBtn.Text = songs.name; songView.songBtn.Text = songs.name; ///点击播放事件 songView.clickBtn.MouseUpEventHandler += (sender, e) => { HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -937,12 +937,12 @@ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", functionIds); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus); if (responsePackNew.Code != "0") if (responsePackNew.Code != "0" || responsePackNew.Data != null || responsePackNew.Data.ToString() != "") { return; } //数据返序列化为Function对象 var str = Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew.Data.ToString()); var str = Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew.Data); var function = Newtonsoft.Json.JsonConvert.DeserializeObject<Function>(str); if (function == null) { @@ -971,18 +971,22 @@ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceIds", new List<string> { music.deviceId }); var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_PlayerList); if (responsePackNew.Code != "0") if (responsePackNew.Code != "0"||responsePackNew.Data == null ||responsePackNew.Data.ToString() == "") { return; } //数据返序列化为Function对象 var str = Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew.Data.ToString()); var str = Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew.Data); var palyLists = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PalyListInfo>>(str); if (palyLists == null) { palyLists =new List<PalyListInfo>(); } A31MusicModel.Current.palyListInfos = palyLists; if (palyLists.Count > 0) { ///默认拿第一个列表 A31MusicModel.Current.palyLists = palyLists[0].playlist; } } catch {