From d22864834edebb8215886f2286b028fcdd00d6b0 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 23 三月 2022 15:32:23 +0800
Subject: [PATCH] 2022-01-23-01

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs         |    4 ++--
 HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs |   13 ++++++-------
 HDL-ON_iOS/HDL-ON_iOS.csproj                               |    2 +-
 HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs        |    1 +
 HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs       |   23 ++++++++++++++++-------
 5 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 77132fa..d36ffaa 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -109,7 +109,7 @@
           <HintPath>..\DLL\Linphone\iOS\Shared.IOS.HDLLinphoneSDK.dll</HintPath>
         </Reference>
         <Reference Include="Shared.IOS.HDLSceneSiri">
-          <HintPath>..\..\HDLXamarinSceneSiri\Shared.IOS.HDLSceneSiri\Shared.IOS.HDLSceneSiri\bin\Release\Shared.IOS.HDLSceneSiri.dll</HintPath>
+          <HintPath>..\DLL\IOS\Shared.IOS.HDLSceneSiri.dll</HintPath>
         </Reference>
     </ItemGroup>
     <ItemGroup>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
index 4dccee2..4859ba5 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -221,9 +221,9 @@
                         funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
                         UserInfo.Current.logicselectedFunction = areaView.btnClick.Tag.ToString();
                         ///鑾峰彇鍗曚釜绫诲瀷锛堜緥濡傦細鐏厜绫汇�傘�傦級璁惧FunctionType鍒楄〃<绠�绉�:spk鍒楄〃>
-                        var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
+                        var typeFunctionList1 = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
                         ///鑾峰彇鍗曚釜鐏厜绫诲瀷锛堜緥濡傦細鐏厜1,鐏厜2銆傘�傦級璁惧鍒楄〃
-                        var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList);
+                        var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList1, functionList);
                         DeviceListView(vv, lists2);
 
                     };
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
index 7fed773..06bf5b9 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -111,11 +111,7 @@
                          playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
                          msg += Language.StringByID(StringId.listMode);
                          break;
-                    default:
-                         modeValueString = ValueProperty.list_cycle;
-                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
-                         msg += Language.StringByID(StringId.listMode);
-                         break;
+                  
                  }
                  A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.mode, modeValueString);
                  new PublicAssmebly().TipMsgAutoClose(msg, false,1000);
@@ -407,11 +403,14 @@
                             //褰撳墠鎾斁闊充箰鏃堕棿
                             //鎸夐亾鐞嗕笉浼氫负绌猴紝GetAttrState("playing_time")鍊煎彲鑳戒负绌猴紝寮哄埗杞崲int.Parse(锛変細鍑虹幇寮傚父锛屼笉杩囦篃鍋氫簡寮傚父澶勭悊浜�
                             int playSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playing_time))+ (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds;
-
+                            if (playSecond >=totalSecond)
+                            {
+                                ///鎾斁鏃堕棿涓嶈兘瓒呰繃鎬绘椂闂达紱
+                                playSecond = totalSecond;
+                            }
                             int playMusicMinute = playSecond / 60;
                             //绉掗挓
                             int playMusicSecond = playSecond % 60;
-
                             string playTime = (playMusicMinute.ToString().Length < 2 ? "0" + playMusicMinute.ToString() : playMusicMinute.ToString()) + ":" + (playMusicSecond.ToString().Length < 2 ? "0" + playMusicSecond.ToString() : playMusicSecond.ToString());
 
                             if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
index 0556fea..f2c4b44 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -167,6 +167,7 @@
                     {
                         try
                         {
+                            
                             SendMethod.mMethod.RefreshDeviceStatus(new List<string> { a31player.functionMusic.deviceId });
                             System.Threading.Thread.Sleep(500);
                         }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
index fda2963..5c5590d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -12,7 +12,7 @@
 {
     public class SendMethod
     {
-        private static SendMethod sMethod=null;    
+        private static SendMethod sMethod = null;
         public static SendMethod mMethod
         {
             get
@@ -48,7 +48,8 @@
             })
             { IsBackground = true }.Start();
         }
-
+        //璁板綍姝屾洸鎾斁鏃堕棿
+        private int songPlayTime = -1;
         /// <summary>
         /// 鑾峰彇璁惧鏈�鏂扮殑鐘舵��
         /// </summary>
@@ -58,7 +59,7 @@
             try
             {
                 //RefreshDeviceStatus(functionIds);
-                a31Music.LastDateTime = DateTime.Now;
+                //a31Music.LastDateTime = DateTime.Now;
                 ///浠庣紦瀛橀噷闈㈡煡鎵鹃煶涔愭挱鏀惧櫒瀵硅薄<缂撳瓨鏁版嵁鏀跺埌鎺ㄩ�佽繃鏉ョ殑鐘舵�佷細鏇存柊缂撳瓨鏁版嵁>
                 var allLocalFuntion = FunctionList.List.GetDeviceFunctionList();
                 var localFunction = allLocalFuntion.Find((obj) => obj.sid == sid);
@@ -68,6 +69,13 @@
                 }
                 ///鏇存柊鐨勬暟鎹�
                 a31Music.functionMusic = localFunction;
+                if (int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(UI2.FuntionControlView.Music.KeyProperty.playing_time)) != songPlayTime)
+                {
+                    ///姝屾洸璁板綍鏃堕棿鍜屽綋鍓嶆椂闂翠笉涓�鏍凤紝绔嬪嵆鏇存柊鏁版嵁鍙嶉鏃堕棿
+                    a31Music.LastDateTime = DateTime.Now;
+                    ///姝屾洸璁板綍鏃堕棿鍜屽綋鍓嶆椂闂翠笉涓�鏍凤紝绔嬪嵆鏇存柊姝屾洸鎾斁鏃堕棿
+                    songPlayTime = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(UI2.FuntionControlView.Music.KeyProperty.playing_time));
+                }
 
             }
             catch { }
@@ -89,6 +97,7 @@
                 {
                     return;
                 }
+
             }
             catch { }
         }
@@ -121,7 +130,7 @@
                 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"||responsePackNew.Data == null ||responsePackNew.Data.ToString() == "")
+                if (responsePackNew.Code != "0" || responsePackNew.Data == null || responsePackNew.Data.ToString() == "")
                 {
                     return;
                 }
@@ -130,7 +139,7 @@
                 var palyLists = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PalyListInfo>>(str);
                 if (palyLists == null)
                 {
-                    palyLists =new List<PalyListInfo>();
+                    palyLists = new List<PalyListInfo>();
                 }
                 if (palyLists.Count > 0)
                 {
@@ -143,12 +152,12 @@
             }
 
         }
-       
+
         /// <summary>
         ///璇锋眰鏈嶅姟鍣紙涓庝綇瀹呮湁鍏�:渚嬪锛沨omeId锛� 
         /// </summary>
         /// <returns></returns>
-        public  ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 5)
+        public ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 5)
         {
             var requestJson = HttpUtil.GetSignRequestJson(o);
             return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);

--
Gitblit v1.8.0