From f748908e5414736eb243ae7ec66a80dc9f5d9d49 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期四, 26 九月 2024 11:37:00 +0800
Subject: [PATCH] 水浸传感器,红外传感器,面板空调

---
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs            |   36 ++---
 HDL-ON_Android/Properties/AndroidManifest.xml                          |    2 
 HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs                              |    2 
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs                                   |    8 
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs         |    8 
 HDL-ON_iOS/HDL-ON_iOS.csproj                                           |    1 
 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs      |    2 
 HDL_ON/Common/ApiUtlis.cs                                              |    2 
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs           |    7 -
 HDL_ON/DAL/Mqtt/MqttClient.cs                                          |   39 ++----
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandListPage.cs        |    2 
 HDL-ON_Android/HDL-ON_Android.csproj                                   |    1 
 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs                                |    4 
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs            |    2 
 HDL-ON_Android/Assets/Phone/FunctionIcon/ArmSensor/Power80pIcon.png    |    0 
 HDL_ON/Common/HDLCommon.cs                                             |    9 -
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs                 |   10 
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs            |   42 ++++++
 HDL_ON/DAL/DriverLayer/Control.cs                                      |    2 
 HDL_ON/UI/MainPage.cs                                                  |    2 
 HDL_ON/UI/UI1-Login/LoginPage.cs                                       |   16 +-
 HDL_ON/Entity/Function/Scene.cs                                        |    4 
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs |   41 ++++++
 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs                   |    5 
 HDL_ON/DAL/DriverLayer/Control_Udp.cs                                  |    6 
 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs         |    2 
 HDL_ON/Entity/Function/Function.cs                                     |   11 +
 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs                  |   48 ++++---
 HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs  |    6 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmSensor/Power80pIcon.png     |    0 
 30 files changed, 201 insertions(+), 119 deletions(-)

diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmSensor/Power80pIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmSensor/Power80pIcon.png
new file mode 100644
index 0000000..0dc5570
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/ArmSensor/Power80pIcon.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 025fd1c..4348464 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -671,6 +671,7 @@
     <AndroidAsset Include="Assets\Phone\FunctionIcon\Acst\Inverter\BatteryIconShutdown100.png" />
     <AndroidAsset Include="Assets\Phone\Collection\TokenInvalidTipIcon.png" />
     <AndroidAsset Include="Assets\Phone\Public\RightIcon2.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\ArmSensor\Power80pIcon.png" />
   </ItemGroup>
   <ItemGroup>
     <AndroidResource Include="Resources\values\colors.xml" />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 9a2a4b2..a948b42 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.7.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409201">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.7.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409231">
 	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
 	<uses-permission android:name="android.permission.RECEIVE_SMS" />
 	<!--绋嬪簭鍙互璇诲彇璁惧澶栭儴瀛樺偍绌洪棿(鍐呯疆SDcard鍜屽缃甋DCard)鐨勬枃浠讹紝鎴戠殑鏂囦欢绛�-->
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 6d6eb34..6a28bf6 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1849,6 +1849,7 @@
       <BundleResource Include="Resources\Phone\FunctionIcon\Acst\Inverter\BatteryIconShutdown100.png" />
       <BundleResource Include="Resources\Phone\Collection\TokenInvalidTipIcon.png" />
       <BundleResource Include="Resources\Phone\Public\RightIcon2.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\ArmSensor\Power80pIcon.png" />
     </ItemGroup>
     <ItemGroup>
       <ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmSensor/Power80pIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmSensor/Power80pIcon.png
new file mode 100644
index 0000000..0dc5570
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/ArmSensor/Power80pIcon.png
Binary files differ
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 93b3a72..3338b19 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -326,7 +326,7 @@
                             {
                                 FunctionList.List.ClearDatas();
                                 MainPage.Log($"璇诲彇璁惧淇℃伅鎴愬姛");
-                                MainPage.Log($"sid鍒楄〃鑾峰彇====\r\n", deviceResult.Data.ToString());
+                                //MainPage.Log($"sid鍒楄〃鑾峰彇====\r\n", deviceResult.Data.ToString());
                                 var deviceList = JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString());
                                 if (deviceList == null)
                                 {
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index c9e3c41..4a012a9 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -533,14 +533,7 @@
             //Application.Activity.StartActivity()
 #endif
 
-            //娴嬭瘯璐﹀彿锛屼笉鎸や笅绾�
-            switch (UserInfo.Current.AccountString)
-            {
-                case "464027401@qq.com":
-                case "15626203746":
-                    
-                    return;
-            }
+            
 
             //鏈櫥褰曚笉鐢ㄥ鐞�
             //if (!UserInfo.Current.IsLogin) return;
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index baec645..0b5a3db 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -1431,7 +1431,7 @@
                                 VenetianBlindsPage.UpdataState(localFunction);
                                 break;
                             case SPK.AcStandard:
-                            case SPK.HvacAC:
+                            case SPK.HvacAC:case SPK.HvacAcPanel:
                             case SPK.AcIr:
                                 Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
                                 if (localFunction != null)
diff --git a/HDL_ON/DAL/DriverLayer/Control_Udp.cs b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
index a697e0b..bc21d64 100644
--- a/HDL_ON/DAL/DriverLayer/Control_Udp.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -197,7 +197,7 @@
                             }
                             break;
                         case SPK.AcStandard:
-                        case SPK.HvacAC:
+                        case SPK.HvacAC:case SPK.HvacAcPanel:
                             AC acTemp = new AC();
                             byte onoff = 0;
                             byte mode = 0;
@@ -609,7 +609,7 @@
                         }
                         break;
                     case SPK.AcStandard:
-                    case SPK.HvacAC:
+                    case SPK.HvacAC:case SPK.HvacAcPanel:
                         var ac = new AC();
 
                         byte onoff = 0;
@@ -957,7 +957,7 @@
                         ControlBytesSend(Command.ReadCurtainStatus, subnetId, deviceId, new byte[] { function.bus.LoopId });
                         break;
                     case SPK.AcStandard:
-                    case SPK.HvacAC:
+                    case SPK.HvacAC:case SPK.HvacAcPanel:
                         ControlBytesSend(Command.ReadACMode, subnetId, deviceId, new byte[] { function.bus.LoopId });
                         break;
                     case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:case SPK.HvacFloorHeatPanel:
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 36272cc..cb8b7c4 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -357,7 +357,7 @@
             //{
             //    return;
             //}
-            if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null)
+            if (OnAppConfig.Instance.LastLoginUserId == ""|| DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null)
             {
                 return;
             }
@@ -860,18 +860,8 @@
         /// </summary>
         static void ReceiveNotifySqueezeAsync(string mMes)
         {
+            MainPage.Log($"鎺ㄩ�佹爣璇嗭細{mMes};鏈湴鏍囪瘑锛歿PushSignStr}");
             if (mMes == PushSignStr) return;//鏄嚜宸辩殑鐧诲綍鎺ㄩ�佷笉澶勭悊//鎴栬�呭綋鍓嶄笉鏄繙绋嬮摼鎺ョ姸鎬�
-            //娴嬭瘯璐﹀彿锛屼笉鎸や笅绾�
-            switch (UserInfo.Current.userMobileInfo)
-            {
-                case "15626203746":
-                    return;
-            }
-
-            //if (!UserInfo.Current.IsLogin)
-            //{
-            //    return;
-            //}
 
             DisConnectRemoteMqttClient("鎸や笅绾�");
 
@@ -880,18 +870,6 @@
                 //寮圭獥鎻愮ず琚尋涓嬬嚎
                 HDLCommon.Current.CheckLogout();
             });
-
-
-            //UserInfo.Current.LastTime = DateTime.MinValue;
-            //UserInfo.Current.SaveUserInfo();
-
-            //Application.RunOnMainThread(() => {
-            //    MainPage.GoLoginPage(UserInfo.Current);
-            //    //寮圭獥鎻愮ず琚尋涓嬬嚎
-            //});
-
-            //2020-08-11 鍒犻櫎鎺ㄩ�佹暟鎹�
-            //HDLRequest.Current.PushserivceSignOut ();
         }
 
         ///// <summary>
@@ -914,6 +892,18 @@
         /// </summary>
         static void SendPushSignOut()
         {
+#if DEBUG
+            MainPage.Log("璋冭瘯妯″紡锛屼笉鍙戝竷鎸や笅绾夸富棰樸��");
+            return;
+#endif
+            //娴嬭瘯璐﹀彿锛屼笉鎸や笅绾�
+            switch (UserInfo.Current.AccountString)
+            {
+                case "15626203746":
+                case "13580507523":
+                    return;
+            }
+
             byte[] message = Encoding.UTF8.GetBytes(PushSignStr);
             MqttRemoteSend(message, 4);
         }
@@ -941,7 +931,6 @@
                         break;
                     case 4://鍙戝竷鏂版柟妗堢殑鎸や笅绾夸富棰�
                         topicName = $"/BusGateWayToClient/{UserInfo.Current.ID}" + PushNotifySqueeze;
-                        //message = Encoding.UTF8.GetBytes (PushSignStr);
                         await RemoteMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topicName, Payload = message, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce });
                         break;
                 }
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 0f71691..8d7ff90 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -198,7 +198,7 @@
                     case SPK.HvacAirFreshJinmao:
                         iconPath = "airFreshjinmao";
                         break;
-                    case SPK.HvacAC:
+                    case SPK.HvacAC:case SPK.HvacAcPanel:
                         iconPath = "acstandard";
                         break;
                     case SPK.HvacFan:
@@ -677,10 +677,12 @@
                         collect = !collect;
                         IMessageCommon.Current.ShowErrorInfoAlter(result);
                     });
-                } else
+                }
+                else
                 {
                     Application.RunOnMainThread(() =>
                     {
+                        this.SaveFunctionFile();
                         UI.HomePage.RefreshFunctionView();
                     });
                 }
@@ -1942,6 +1944,10 @@
         /// </summary>
         public const string HvacAC = "hvac.ac";
         /// <summary>
+        /// 闈㈡澘绌鸿皟
+        /// </summary>
+        public const string HvacAcPanel = "hvac.ac_panel";
+        /// <summary>
         /// 姣涚粏绠$┖璋�
         /// </summaryc
         public const string HvacCac = "hvac.cac";
@@ -1955,6 +1961,7 @@
             var spkList = new List<string>();
             spkList.Add(AcStandard);
             spkList.Add(HvacAC);
+            spkList.Add(HvacAcPanel);
             spkList.Add(AcIr);
             spkList.Add(HvacCac);
             return spkList;
diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index 9b57845..585d39d 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -421,6 +421,10 @@
                         IMessageCommon.Current.ShowErrorInfoAlter(result);
                     });
                 }
+                else
+                {
+                    this.SaveSceneFile();
+                }
             })
             { IsBackground = true }.Start();
         }
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 5abbe13..80c010f 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -115,7 +115,7 @@
         public static List<string> SceneSupportFunctionList = new List<string> {
             SPK.LightCCT,SPK.LightDimming,SPK.LightSwitch,SPK.LightRGB,
             SPK.CurtainRoller,SPK.CurtainSwitch,SPK.CurtainTrietex,SPK.CurtainDream,
-            SPK.AcIr,SPK.AcStandard,SPK.HvacAC,
+            SPK.AcIr,SPK.AcStandard,SPK.HvacAC,SPK.HvacAcPanel,
             SPK.FloorHeatStandard,SPK.HvacFloorHeat,SPK.HvacFloorHeatPanel,
             SPK.AirFreshStandard,SPK.HvacAirFresh,
             SPK.AirSwitch,
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index e83f2fd..67981ec 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -228,7 +228,7 @@
                         break;
                     case SPK.AcIr:
                     case SPK.AcStandard:
-                    case SPK.HvacAC:
+                    case SPK.HvacAC:case SPK.HvacAcPanel:
                         var acPage = new AcControlPage();
                         acPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
diff --git a/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs b/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs
index 2ba65dc..e319bfa 100644
--- a/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs
+++ b/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs
@@ -20,11 +20,11 @@
         /// <summary>
         /// 杩涘害鏉�
         /// </summary>
-        private NormalViewControl btnProgress = null;
+        public NormalViewControl btnProgress = null;
         /// <summary>
         /// 鍥炬爣鎺т欢
         /// </summary>
-        private IconViewControl btnIcon = null;
+        public IconViewControl btnIcon = null;
 
         #endregion
 
@@ -91,12 +91,14 @@
                 //鍙樼孩鑹�
                 this.btnProgress.BackgroundColor = 0xfff62f48;
                 this.btnIcon.UnSelectedImagePath = "Public/BatteryNot.png";
+                this.btnIcon.SelectedImagePath = "Public/BatteryNot.png";
             }
             else
             {
                 //鍙樼伆鑹�
                 this.btnProgress.BackgroundColor = CSS_Color.PromptingColor1;
                 this.btnIcon.UnSelectedImagePath = "Public/BatteryEnough.png";
+                this.btnIcon.SelectedImagePath = "Public/BatteryEnough.png";
             }
         }
 
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index c1afe23..099247a 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -282,6 +282,11 @@
             {
                 Application.HideSoftInput();
             };
+            //btnIcon.MouseUpEventHandler = (sender, e) =>
+            //{
+            //    etAccount.Text = "13580507523";
+            //    etPassword.Text = "a123456";
+            //};
 
 #if DEBUG
             btnIcon_bg.MouseUpEventHandler += (sender, e) =>
@@ -291,13 +296,8 @@
             };
 
             bool b = false;
-            btnIcon.MouseUpEventHandler += (sender, e) =>
+            btnIcon.MouseUpEventHandler = (sender, e) =>
             {
-
-
-                //ESOnVideo.Current.Test(false);
-
-                //return;
                 if (b)
                 {
                     //etAccount.Text = "18022428438";//wjc
@@ -538,6 +538,10 @@
             };
             passwordView.AddChidren(etPassword);
 
+
+            etAccount.Text = "13580507523";
+            etPassword.Text = "a123456";
+
             #region 瀵嗙爜鐧诲綍-鎺т欢鍔犺浇
             btnVisiblePassword = new Button()
             {
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 48d096f..9c335d4 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1006,10 +1006,10 @@
                     //    continue;
                     //}
                     //else
-                    {
-                        if (!function.collect&& function.spk != SPK.InverterJinmao)
-                            continue;
-                    }
+                    //{
+                    if (!function.collect&& function.spk != SPK.InverterJinmao)
+                        continue;
+                    //}
                     if (index % 2 == 0)
                     {
                         rowView = new FrameLayout()
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 6093297..53cd5a5 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -330,7 +330,9 @@
                     }
                 }
                 #endregion
-                bodyView.linkStateMsgView.Y = ApiUtlis.Ins.IsValidToken ? Application.GetRealHeight(113) : Application.GetRealHeight(113) - Application.GetRealWidth(24);
+                if (bodyView.linkStateMsgView != null){
+                    bodyView.linkStateMsgView.Y = ApiUtlis.Ins.IsValidToken ? Application.GetRealHeight(113) : Application.GetRealHeight(113) - Application.GetRealWidth(24);
+                }
             }
             catch (Exception ex)
             {
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 876deaa..946089d 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -765,7 +765,10 @@
                     case ShowFunction.VideoIntercom:
                         if (FunctionList.List.videoIntercom != null && FunctionList.List.videoIntercom.Count > 0)
                         {
-                            functionCount = 1;
+                            if (Common.ApiUtlis.Ins.hadInternet)
+                            {
+                                functionCount = 1;
+                            }
                         }
                         break;
                     case ShowFunction.SecurityCenter:
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 80844c1..ddc33ad 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -1,5 +1,6 @@
 锘縰sing System;
 using HDL_ON.Entity;
+using HDL_ON.Stan;
 using HDL_ON.UI.CSS;
 using Shared;
 
@@ -93,27 +94,38 @@
             }
             else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk)) //浼犳劅鍣ㄦ病鏈夊紑鍏虫寜閽�)
             {
+                //if(function.spk == SPK.SensorPir || function.spk == SPK.SensorWater) { }
                 var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
-                if (powerLowTipAttr != null)
+                if (powerLowTipAttr != null && !string.IsNullOrEmpty( powerLowTipAttr.state.ToString()))
                 {
-                    if (powerLowTipAttr.state.ToLower() == "low")
+                    //鐢垫睜鎺т欢銆�
+                    Button btnTipPowerLow = new Button()
                     {
-                        Button btnTipPowerLow = new Button()
-                        {
-                            X = Application.GetRealWidth(307),
-                            Y = Application.GetRealHeight(45),
-                            Width = Application.GetRealWidth(24),
-                            Height = Application.GetRealWidth(24),
-                            UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
-                            SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
-                        };
-                        this.AddChidren(btnTipPowerLow);
-                    }
+                        X = Application.GetRealWidth(307),
+                        Y = Application.GetRealHeight(45),
+                        Width = Application.GetRealWidth(24),
+                        Height = Application.GetRealWidth(24),
+                        UnSelectedImagePath = "FunctionIcon/ArmSensor/Power80pIcon.png",
+                        SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
+                        IsSelected = powerLowTipAttr.state.ToLower() == "low"
+                    };
+                    this.AddChidren(btnTipPowerLow);
+
+                    //var batteryControl = new BatteryPersentControl();
+                    //batteryControl.X = Application.GetRealWidth(107);
+                    //batteryControl.Y = Application.GetRealHeight(45);
+                    //batteryControl.InitControl();
+                    //this.AddChidren(batteryControl);
+                    //batteryControl.SetValue(80);
+                    //if (powerLowTipAttr.state.ToLower() == "low")
+                    //{
+                    //    batteryControl.SetValue(20);
+                    //}
+                    //batteryControl.btnIcon.Visible = true;
+                    //batteryControl.btnIcon.BackgroundColor = 0x88008800;
                 }
 
-
-
-                else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose  )
+                else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose)
                 {
                     var btnStatus = new Button()
                     {
@@ -127,8 +139,6 @@
                         Tag = function.sid + "_SenesorMegahealth_Status"
                     };
                     bodyDiv.AddChidren(btnStatus);
-
-
 
                     var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
                     if (tempStatus != null)
@@ -207,7 +217,7 @@
                     bodyDiv.AddChidren(btnStatus);
 
                     var alarm_status = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus);
-                    if(alarm_status!= null)
+                    if (alarm_status != null)
                     {
                         if (alarm_status.curValue.ToString() == "normal")
                         {
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index b1e1cad..5e66d36 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -100,7 +100,7 @@
                 case SPK.CurtainTrietex:
                 //绌鸿皟
                 case SPK.AcStandard:
-                case SPK.HvacAC:
+                case SPK.HvacAC:case SPK.HvacAcPanel:
                 case SPK.AcIr:
                 //鍦扮儹
                 case SPK.FloorHeatStandard:
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index a1ac37b..4ca5ce9 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -161,7 +161,7 @@
                                 case SPK.CurtainTrietex:
                                 //绌鸿皟
                                 case SPK.AcStandard:
-                                case SPK.HvacAC:
+                                case SPK.HvacAC:case SPK.HvacAcPanel:
                                 case SPK.AcIr:
                                 //鍦扮儹
                                 case SPK.HvacFloorHeat:case SPK.HvacFloorHeatPanel:
@@ -1283,7 +1283,7 @@
                                     }
                                     break;
                                 case SPK.AcStandard:
-                                case SPK.HvacAC:
+                                case SPK.HvacAC:case SPK.HvacAcPanel:
                                 case SPK.AcIr:
                                     {
                                         string on_off = GetKeyValue("on_off", dicList);
@@ -2010,7 +2010,7 @@
 
                     }
                     break;
-                case SPK.AcStandard:
+                case SPK.AcStandard:case SPK.HvacAcPanel:
                 case SPK.HvacAC:
                 case SPK.AcIr:
                     {
@@ -2829,7 +2829,7 @@
                                         }
                                     }
                                     break;
-                                case SPK.AcStandard:
+                                case SPK.AcStandard:case SPK.HvacAcPanel:
                                 case SPK.HvacAC:
                                 case SPK.AcIr:
                                 case SPK.FloorHeatStandard:case SPK.HvacFloorHeatPanel:
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index ca2a17b..d239964 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -422,7 +422,7 @@
                 deviceStrTypeList.Add(Language.StringByID(StringId.Curtain));
             }
             ///绌鸿皟绫�
-            var ac = deviceList.Find((device) => device.spk == SPK.AcStandard || device.spk == SPK.HvacAC|| device.spk == SPK.AcIr);
+            var ac = deviceList.Find((device) => device.spk == SPK.AcStandard || device.spk == SPK.HvacAC|| device.spk == SPK.AcIr || device.spk == SPK.HvacAcPanel);
             if (ac != null)
             {
                 deviceStrTypeList.Add(Language.StringByID(StringId.AC));
@@ -557,7 +557,7 @@
             else if (deviceType == Language.StringByID(StringId.AC))
             {
                 functionTypeList.Add(SPK.AcStandard);
-                functionTypeList.Add(SPK.HvacAC);
+                functionTypeList.Add(SPK.HvacAC); functionTypeList.Add(SPK.HvacAcPanel);
                 functionTypeList.Add(SPK.HvacCac);
                 functionTypeList.Add(SPK.AcIr);
             }
@@ -657,7 +657,7 @@
                 functionTypeList.Add(SPK.CurtainRoller);
                 functionTypeList.Add(SPK.CurtainTrietex);
                 functionTypeList.Add(SPK.AcStandard);
-                functionTypeList.Add(SPK.HvacAC);
+                functionTypeList.Add(SPK.HvacAC); functionTypeList.Add(SPK.HvacAcPanel);
                 functionTypeList.Add(SPK.AcIr);
                 functionTypeList.Add(SPK.FloorHeatStandard);
                 functionTypeList.Add(SPK.HvacFloorHeat); functionTypeList.Add(SPK.HvacFloorHeatPanel);
@@ -732,7 +732,7 @@
                         deviceTypeList.Add(SPK.CurtainSwitch);
                         deviceTypeList.Add(SPK.CurtainRoller);
                         deviceTypeList.Add(SPK.CurtainTrietex);
-                        deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAC);deviceTypeList.Add(SPK.AcIr);
+                        deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAC);deviceTypeList.Add(SPK.AcIr); deviceTypeList.Add(SPK.HvacAcPanel);
                         deviceTypeList.Add(SPK.AirFreshStandard); deviceTypeList.Add(SPK.HvacAirFresh);
                         deviceTypeList.Add(SPK.FloorHeatStandard); deviceTypeList.Add(SPK.HvacFloorHeat); deviceTypeList.Add(SPK.HvacFloorHeatPanel);
                         deviceTypeList.Add(SPK.SensorSmoke);
@@ -783,7 +783,7 @@
                         deviceTypeList.Add(SPK.CurtainSwitch);
                         deviceTypeList.Add(SPK.CurtainRoller);
                         deviceTypeList.Add(SPK.CurtainTrietex);
-                        deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAC); deviceTypeList.Add(SPK.AcIr);
+                        deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAC); deviceTypeList.Add(SPK.AcIr); deviceTypeList.Add(SPK.HvacAcPanel);
                         deviceTypeList.Add(SPK.FloorHeatStandard); deviceTypeList.Add(SPK.HvacFloorHeat); deviceTypeList.Add(SPK.HvacFloorHeatPanel);
                         deviceTypeList.Add(SPK.AirFreshStandard); deviceTypeList.Add(SPK.HvacAirFresh);
                         deviceTypeList.Add(SPK.AirSwitch);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 5726502..a4654d1 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -455,6 +455,7 @@
                     break;
                 case SPK.AcStandard:
                 case SPK.HvacAC:
+                case SPK.HvacAcPanel:
                 case SPK.AcIr:
                     {
                         #region 鐣岄潰
@@ -987,6 +988,7 @@
                             }
                         case SPK.HvacAC:
                         case SPK.AcIr:
+                        case SPK.HvacAcPanel:
                         case SPK.AcStandard:
                         case SPK.FloorHeatStandard:
                         case SPK.HvacFloorHeat:case SPK.HvacFloorHeatPanel:
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
index d801642..7667216 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
@@ -181,8 +181,6 @@
                 };
                 row.AddChidren(btnName);
 
-
-
                 btnName.MouseUpEventHandler = (sender, e) =>
                 {
                     switch (device.spk)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
index f54199f..1dfa8c2 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
@@ -109,11 +109,13 @@
             bool isFrist = true;
             foreach (var brand in brandList)
             {
-                if(brand.productPlatform == "HaiLin")//瀛愭櫞闇�瑕侀殣钘忚繖涓叆鍙o紝鐢辫皟璇曡蒋浠朵笂浼犳暟鎹� 2023-03-09 17:20:33
+                if (brand.productPlatform == "HaiLin")//瀛愭櫞闇�瑕侀殣钘忚繖涓叆鍙o紝鐢辫皟璇曡蒋浠朵笂浼犳暟鎹� 2023-03-09 17:20:33
                 {
                     continue;
-                }else if(brand.productPlatform == "TUYA") {
-                    if(DB_ResidenceData.Instance.CurrentRegion.regionUrl != "https://test-gz.hdlcontrol.com" &&
+                }
+                else if (brand.productPlatform == "TUYA")
+                {
+                    if (DB_ResidenceData.Instance.CurrentRegion.regionUrl != "https://test-gz.hdlcontrol.com" &&
                        DB_ResidenceData.Instance.CurrentRegion.regionUrl != "https://china-gateway.hdlcontrol.com")
                     {
                         continue;
@@ -127,22 +129,16 @@
                 };
                 contentView.AddChidren(row);
 
-                //if (isFrist)
-                //{
-                //    isFrist = false;
-                //}
-                //else
+
+                Button btnLine = new Button()
                 {
-                    Button btnLine = new Button()
-                    {
-                        Y = Application.GetRealHeight(86),
-                        Gravity = Gravity.CenterHorizontal,
-                        Width = Application.GetRealWidth(343),
-                        Height = 1,
-                        BackgroundColor = CSS_Color.DividingLineColor,
-                    };
-                    row.AddChidren(btnLine);
-                }
+                    Y = Application.GetRealHeight(86),
+                    Gravity = Gravity.CenterHorizontal,
+                    Width = Application.GetRealWidth(343),
+                    Height = 1,
+                    BackgroundColor = CSS_Color.DividingLineColor,
+                };
+                row.AddChidren(btnLine);
 
                 ImageView btnIcon = new ImageView()
                 {
@@ -177,8 +173,8 @@
                 //涓嬭浇绗笁鏂瑰搧鐗宨con
                 ImageUtlis.Current.Load3tyBrandIconImages(brand.brandName, brand.brandIcon, btnIcon);
 
-                EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
-                    
+                EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+                {
                     var page = new DeviceListPage(brand);
                     MainPage.BasePageView.AddChidren(page);
                     page.LoadPage();
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
index 2bcf880..4d02f55 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -24,7 +24,6 @@
             brand = integratedBrand;
         }
 
-
         public void LoadPage()
         {
             Action<string, string> action = (s, a) =>
@@ -68,7 +67,7 @@
                 {
                     var pm = new HttpServerRequest();
                     var pack = pm.Get3TyBrandBindDeviceList(brand.productPlatform, brand.productBrand);
-                    if (pack.Code == DAL.Server.StateCode.SUCCESS)
+                    if (pack.Code == StateCode.SUCCESS)
                     {
                         var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<Function3tyBrandObj>(pack.Data.ToString());
 
@@ -118,10 +117,6 @@
             bool isFrist = true;
             foreach (var device in deviceList)
             {
-                //if (!this.CheckSupportDevice(device))
-                //{
-                //    continue;
-                //}
                 var row = new RowLayout()
                 {
                     Height = Application.GetRealHeight(50),
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandListPage.cs
index 46448a5..640aad8 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/Iot_BrandListPage.cs
@@ -26,8 +26,6 @@
 
         public void LoadPage()
         {
-
-
             var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.Bind3thIotAccount));
             topView.maginY = 10;
             topView.LoadTopView(CSS_Color.MainBackgroundColor);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
index 9655256..ebeb336 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
@@ -46,11 +46,38 @@
             { IsBackground = true }.Start();
         }
 
+        BatteryPersentControl batteryControl;
         /// <summary>
         /// 鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
         /// </summary>
         private void InitFrameWhiteContent1()
         {
+            //鐢垫睜鎺т欢
+            this.batteryControl = new BatteryPersentControl();
+            //瀹冩湁涓渶灏忕殑X杞�
+            batteryControl.X = Application.GetRealWidth(104) > base.btnRoomName.Right ? Application.GetRealWidth(104) : base.btnRoomName.Right + Application.GetRealWidth(4);
+            if (batteryControl.Height > base.btnRoomName.Height)
+            {
+                //涓�涓槸25锛屼竴涓槸21锛屽紕涓嶅噯鍒板簳璋佹洿楂�,鍥犱负璁$畻鏂规硶涓嶄竴鏍�
+                batteryControl.Y = base.btnRoomName.Y - (batteryControl.Height - base.btnRoomName.Height) / 2;
+            }
+            else
+            {
+                batteryControl.Y = base.btnRoomName.Y + (batteryControl.Height - base.btnRoomName.Height) / 2;
+            }
+            batteryControl.InitControl(false);
+            batteryControl.SetValue(80);
+            var powerLowTipAttr = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+            if (powerLowTipAttr != null)
+            {
+                if (powerLowTipAttr.state.ToLower() == "low")
+                {
+                    batteryControl.SetValue(20);
+                }
+            }
+            FrameWhiteCentet1.AddChidren(batteryControl);
+
+
             btnIcon = new IconViewControl(198)
             {
                 Gravity = Gravity.CenterHorizontal,
@@ -133,8 +160,6 @@
                         btnSuctionView.IsSelected = false;
                     }
                 }
-
-
                 else
                 {
                     temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus);
@@ -151,6 +176,19 @@
                         btnSuctionView.IsSelected = false;
                     }
                 }
+
+                var powerLowTipAttr = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+                if (powerLowTipAttr != null)
+                {
+                    if (powerLowTipAttr.state.ToLower() == "low")
+                    {
+                        batteryControl.SetValue(20);
+                    }
+                    else
+                    {
+                        batteryControl.SetValue(80);
+                    }
+                }
             });
         }
 
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
index a4e92e1..0aef0ed 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
@@ -47,12 +47,38 @@
             })
             { IsBackground = true }.Start();
         }
-
+        BatteryPersentControl batteryControl;
         /// <summary>
         /// 鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
         /// </summary>
         private void InitFrameWhiteContent1()
         {
+            //鐢垫睜鎺т欢
+            this.batteryControl = new BatteryPersentControl();
+            //瀹冩湁涓渶灏忕殑X杞�
+            batteryControl.X = Application.GetRealWidth(104) > base.btnRoomName.Right ? Application.GetRealWidth(104) : base.btnRoomName.Right + Application.GetRealWidth(4);
+            if (batteryControl.Height > base.btnRoomName.Height)
+            {
+                //涓�涓槸25锛屼竴涓槸21锛屽紕涓嶅噯鍒板簳璋佹洿楂�,鍥犱负璁$畻鏂规硶涓嶄竴鏍�
+                batteryControl.Y = base.btnRoomName.Y - (batteryControl.Height - base.btnRoomName.Height) / 2;
+            }
+            else
+            {
+                batteryControl.Y = base.btnRoomName.Y + (batteryControl.Height - base.btnRoomName.Height) / 2;
+            }
+            batteryControl.InitControl(false);
+            batteryControl.SetValue(80);
+            var powerLowTipAttr = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+            if (powerLowTipAttr != null)
+            {
+                if(powerLowTipAttr.state.ToLower() == "low")
+                {
+                    batteryControl.SetValue(20);
+                }
+            }
+            FrameWhiteCentet1.AddChidren(batteryControl);
+
+
             btnIcon = new IconViewControl(198)
             {
                 Gravity = Gravity.CenterHorizontal,
@@ -136,6 +162,19 @@
                         btnSuctionView.IsSelected = false;
                     }
                 }
+
+                var powerLowTipAttr = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+                if (powerLowTipAttr != null)
+                {
+                    if (powerLowTipAttr.state.ToLower() == "low")
+                    {
+                        batteryControl.SetValue(20);
+                    }
+                    else
+                    {
+                        batteryControl.SetValue(80);
+                    }
+                }
             });
         }
 

--
Gitblit v1.8.0