From c26c06ef4a22d6fb9e59dc734abca92fa8a23c47 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 05 六月 2020 17:41:00 +0800 Subject: [PATCH] 2020-06-05-02 --- HDL_ON/UI/Music/View/MusicView.cs | 7 ++++--- HDL_ON/UI/Music/A31PlayMusicPage.cs | 5 ++--- HDL_ON/UI/Music/A31MusicModel.cs | 2 ++ .vs/HDL_APP_Project/xs/sqlite3/storage.ide | 0 .vs/HDL_APP_Project/xs/UserPrefs.xml | 14 ++++++-------- .vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal | 0 HDL_ON/UI/Music/View/DialogView.cs | 11 +++++------ 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index c5510af..3ada873 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,12 +1,12 @@ 锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/Music/View/MusicView.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/Music/View/DialogView.cs"> <Files> - <File FileName="HDL_ON/UI/Music/View/DialogView.cs" Line="1290" Column="66" /> - <File FileName="HDL_ON/UI/Music/MusicMain.cs" Line="219" Column="28" /> + <File FileName="HDL_ON/UI/Music/View/DialogView.cs" Line="1" Column="1" /> + <File FileName="HDL_ON/UI/Music/MusicMain.cs" Line="200" Column="42" /> <File FileName="HDL_ON/UI/Music/SendMethod.cs" Line="150" Column="49" /> <File FileName="HDL_ON/UI/Music/A31MusicModel.cs" Line="217" Column="29" /> <File FileName="HDL_ON/UI/Music/A31PlayMusicPage.cs" Line="384" Column="19" /> - <File FileName="HDL_ON/UI/Music/View/MusicView.cs" Line="24" Column="60" /> + <File FileName="HDL_ON/UI/Music/View/MusicView.cs" Line="211" Column="12" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -18,7 +18,7 @@ <Node name="UI" expanded="True"> <Node name="Music" expanded="True"> <Node name="View" expanded="True"> - <Node name="MusicView.cs" selected="True" /> + <Node name="Dialog_View.cs" selected="True" /> </Node> </Node> <Node name="UI0-Public" expanded="True" /> @@ -29,9 +29,7 @@ </Node> <Node name="HDL-ON_Android" expanded="True"> <Node name="Assets" expanded="True"> - <Node name="Phone" expanded="True"> - <Node name="MusicIcon" expanded="True" /> - </Node> + <Node name="Phone" expanded="True" /> </Node> </Node> </Node> diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide index ffec704..5d83525 100644 --- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide +++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide Binary files differ diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal index d9bd4d9..047f5a9 100644 --- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal +++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal Binary files differ diff --git a/HDL_ON/UI/Music/A31MusicModel.cs b/HDL_ON/UI/Music/A31MusicModel.cs index 55224d2..ec7df2c 100644 --- a/HDL_ON/UI/Music/A31MusicModel.cs +++ b/HDL_ON/UI/Music/A31MusicModel.cs @@ -50,6 +50,8 @@ public string Name=string.Empty; /// <summary> /// 涓婁竴娆℃洿鏂扮殑鏃堕棿 + /// 璁板綍鏁版嵁鍙嶉鐨勬椂闂�(鍥犱负鏈夋椂闂寸綉缁滃樊鏁版嵁涓嶅洖澶嶏紝瀵艰嚧鍒锋柊褰撳墠鎾斁闊充箰鏃堕棿涓嶆纭�) + /// ((褰撳墠鏃堕棿)DateTime.Now - (璁板綍鏃堕棿)LastDateTimeLastDateTime).TotalSeconds=璇樊鏃堕棿(绉�) /// </summary> public DateTime LastDateTime; /// <summary> diff --git a/HDL_ON/UI/Music/A31PlayMusicPage.cs b/HDL_ON/UI/Music/A31PlayMusicPage.cs index d97492b..57cd533 100644 --- a/HDL_ON/UI/Music/A31PlayMusicPage.cs +++ b/HDL_ON/UI/Music/A31PlayMusicPage.cs @@ -480,9 +480,8 @@ //鏇存柊鎾斁鍣ㄩ煶閲忕粰绯荤粺闊抽噺 Volume.MusicVolume = playView.volSeekBar.Progress; //褰撳墠鎾斁闊充箰鏃堕棿 - int playSecond = int.Parse(A31MusicModel.Current.A31PlayStatus.curpos) / 1000;// + (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds; - //currentMusiceA31.musicPalyTime = (playSecond*10).ToString(); - //鍒嗛挓 + int playSecond = int.Parse(A31MusicModel.Current.A31PlayStatus.curpos) / 1000+(int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds; + int playMusicMinute = playSecond / 60; //绉掗挓 int playMusicSecond = playSecond % 60; diff --git a/HDL_ON/UI/Music/View/DialogView.cs b/HDL_ON/UI/Music/View/DialogView.cs index b9aff05..ebc8951 100644 --- a/HDL_ON/UI/Music/View/DialogView.cs +++ b/HDL_ON/UI/Music/View/DialogView.cs @@ -1001,7 +1001,7 @@ MusicMain.loading.Start("瑙i櫎涓�..."); var slaveList = new List<Slave>(); slaveList.AddRange(a31player.Slave.slave_list); - bool host_If = false; //琛ㄧず鏄惁鏄剧ず瑙i櫎鐨勬挱鏀� + // bool host_If = false; //琛ㄧず鏄惁鏄剧ず瑙i櫎鐨勬挱鏀� bool _if = false; System.Threading.Tasks.Task.Run(() => { @@ -1010,7 +1010,6 @@ var play_If = playList1.Find((obj) => obj.UniqueDeviceName == a31player.UniqueDeviceName); if (play_If == null) { - host_If = false; //瀛愰煶绠变笌涓婚煶绠辨柇寮�鐨勫懡浠� for (int i = 0; i < playList1.Count; i++) { @@ -1028,7 +1027,6 @@ } else { - host_If = true; //瑙f暎缁勭殑鍛戒护 if (null == SendMethod.OpenWeb("http://" + a31player.IPAddress + "/httpapi.asp?command=multiroom:Ungroup")) { @@ -1050,7 +1048,7 @@ var tmepSlaves = Newtonsoft.Json.JsonConvert.DeserializeObject<Slaves>(result); if (tmepSlaves != null) { - if (host_If && tmepSlaves.slave_list.Count == 0) + if (tmepSlaves.slave_list.Count == 0) { var host_music = A31MusicModel.A31MusicModelList.Find((c) => c.UniqueDeviceName == a31player.UniqueDeviceName); @@ -1073,9 +1071,9 @@ } else { - for (int a = 0; a < playList1.Count; a++) + for (int b = 0; b < tmepSlaves.slave_list.Count; b++) { - var uuid = playList1[a].UniqueDeviceName; + var uuid = tmepSlaves.slave_list[b].uuid.Replace("uuid:", ""); var music = A31MusicModel.A31MusicModelList.Find((c) => c.UniqueDeviceName == uuid); if (music != null) { @@ -1084,6 +1082,7 @@ music.IsOnLine = false;//鍏堜笉鍏佽璇诲彇 } } + } var host_a31player = A31MusicModel.A31MusicModelList.Find((c) => c.UniqueDeviceName == a31player.UniqueDeviceName); diff --git a/HDL_ON/UI/Music/View/MusicView.cs b/HDL_ON/UI/Music/View/MusicView.cs index 2f98906..e09eef3 100644 --- a/HDL_ON/UI/Music/View/MusicView.cs +++ b/HDL_ON/UI/Music/View/MusicView.cs @@ -12,6 +12,7 @@ { Height = Application.GetRealHeight(12 + 139), Width = Application.GetRealWidth(375), + }; /// <summary> ///鐧借壊鑳屾櫙鐨勬帶浠� @@ -23,6 +24,7 @@ Height = Application.GetRealHeight(139), Width = Application.GetRealWidth(375 - 16 * 2), BackgroundColor = Color.WhiteColor, + Radius= (uint)Application.GetRealHeight(12), }; /// <summary> ///鏄剧ず闊充箰鐘舵�佸浘鏍� @@ -45,6 +47,7 @@ Width = Application.GetRealWidth(70), Height = Application.GetRealHeight(25), BackgroundColor = Color.ViewColor, + Radius = (uint)Application.GetRealHeight(12), }; /// <summary> ///缁勫悎鍥炬爣 @@ -205,9 +208,7 @@ musicIfonFl.AddChidren(prevBtn); musicIfonFl.AddChidren(playBtn); musicIfonFl.AddChidren(nextBtn); - musicIfonFl.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); - mergeBjBtn.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); - + } } } -- Gitblit v1.8.0