From 22288c2816f39348316a961806dc41bbe0ab6822 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 08 一月 2024 09:40:01 +0800
Subject: [PATCH] V2.4.3 bug fixed

---
 HDL-ON_Android/Properties/AndroidManifest.xml                            |    2 
 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs           |    2 
 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs                  |   52 ++++++++++++++++
 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png  |    0 
 HDL_ON/Common/ApiUtlis.cs                                                |    2 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png   |    0 
 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs           |   57 +++++++++++++++++--
 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png |    0 
 HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs            |   35 ++++++-----
 HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs           |   11 +++
 HDL_ON/DAL/Server/HttpServerRequest.cs                                   |    2 
 HDL_ON/UI/UI1-Login/LoginPage.cs                                         |    4 
 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png  |    0 
 13 files changed, 138 insertions(+), 29 deletions(-)

diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png
index 55fe174..4dd5fff 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png
index 4dd5fff..55fe174 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png
Binary files differ
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 597ffce..e0270dd 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.4.3" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202401031">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.4.3" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202401051">
 	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
 	<uses-permission android:name="android.permission.RECEIVE_SMS" />
 	<!--鍙嬬洘-->
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png
index 55fe174..4dd5fff 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png
index 4dd5fff..55fe174 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png
Binary files differ
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 96f5c7d..094a6e3 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -536,7 +536,7 @@
                         //======================瀹夐槻====================
                         GetSecurityList();
 
-                        //===================璇诲彇閫昏緫鍒楄〃==========================
+                        //===================璇诲彇閫昏緫鍒楄〃====================
                         Logic.LogicList.Clear();//涓婚〉涓嬫媺寮哄埗鍒锋柊鑷姩鍖栧垪琛�
                         MainView.GetLogicList();//璇诲彇鑷姩鍖栧垪琛�
                     })
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index e8e9e59..731c865 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1538,7 +1538,7 @@
         }
 #endregion
 
-#region 鑾峰彇澶╂皵閮ㄥ垎
+        #region 鑾峰彇澶╂皵閮ㄥ垎
         /// <summary>
         /// 鑾峰彇鎸囧畾缁忕含搴︾殑鍩庡競淇℃伅澶╂皵淇℃伅
         /// </summary>
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index de1cf2e..6584a1e 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -329,11 +329,11 @@
                     etAccount.Text = "13533335801";
                     etAccount.Text = "13682244600";
                     etAccount.Text = "marketing@australindo.co.id";
-                    etAccount.Text = "support7@hdlautomation.com";
                     etAccount.Text = "13922115008";//鍒樻��
                     etAccount.Text = "1272061968@qq.com";
-                    etAccount.Text = "support7@hdlautomation.com";
                     etAccount.Text = "info@hdlegypt.com";
+                    etAccount.Text = "support7@hdlautomation.com";
+                    etAccount.Text = "18402017839";
 
 
                 }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index e8b86db..9a2e707 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -759,14 +759,40 @@
 
 
                         ///璁惧寤舵椂iewv
-                        DelayView(fLayout, volView.frameLayout.Bottom);
+                        var delayView = DelayView(fLayout, volView.frameLayout.Bottom);
+                        if (edit )
+                        {
+                            Output outputs = Logic.currlogic.output[index];
+                            var dicList = outputs.status.Find((obj) => obj.ContainsValue(FunctionAttributeKey.OnOff));
+                            if (dicList != null)
+                            {
+                                if (dicList.ContainsValue( "off") || dicList.ContainsValue("pause"))
+                                {
+                                    funTypeView.frameLayout.Visible = false;
+                                    volView.frameLayout.Visible = false;
+                                    delayView.frameLayout.Y = switchVie.frameLayout.Bottom;
+                                }
+                            }
+                        }
                         #endregion
                         #region 鐐瑰嚮浜嬩欢
                         ///寮�鍏崇偣鍑讳簨浠�
                         switchVie.btnClick.MouseUpEventHandler += (sender, e) =>
                         {
-
-                            SwitchViewMethod(device, switchVie.btnState, 2);
+                            SwitchViewMethod(device, switchVie.btnState, 2, (v) => {
+                                if (v == "on")
+                                {
+                                    funTypeView.frameLayout.Visible = true;
+                                    volView.frameLayout.Visible = true;
+                                    delayView.frameLayout.Y = volView.frameLayout.Bottom;
+                                }
+                                else
+                                {
+                                    funTypeView.frameLayout.Visible = false;
+                                    volView.frameLayout.Visible = false;
+                                    delayView.frameLayout.Y = switchVie.frameLayout.Bottom;
+                                }
+                            });
                         };
                         ///鎻愮ず璇煶鐐瑰嚮浜嬩欢
                         funTypeView.btnClick.MouseUpEventHandler += (sender, e) =>
@@ -1002,6 +1028,23 @@
                                     dicList.AddRange(diclist);//鍐嶆坊鍔犲叾瀹冨睘鎬�
                                     dicSateteList = dicList;//閲嶆柊璧嬪��
                                 }
+                                var onoffDic = dicSateteList.Find((obj) => obj.ContainsValue("on_off"));
+                                if (onoffDic != null)
+                                {
+                                    if (onoffDic.ContainsValue("off"))
+                                    {
+                                        for(int i =0;i<dicSateteList.Count;)
+                                        {
+                                            var d = dicSateteList[i];
+                                            if(!d.ContainsValue("on_off") || d.ContainsValue("delay"))
+                                            {
+                                                dicSateteList.Remove(d);
+                                                continue;
+                                            }
+                                            i++;
+                                        }
+                                    }
+                                }
                             }
                             break;
                         case SPK.GroupControl:
@@ -1052,7 +1095,7 @@
         /// </summary>
         /// <param name="fLayout">鐖舵帶浠�</param>
         /// <param name="bottomY">鍦ㄥ摢涓帶浠朵笅闈�</param>
-        private void DelayView(FrameLayout fLayout, int bottomY)
+        private LogicView.FunTypeView DelayView(FrameLayout fLayout, int bottomY)
         {
             LogicView.FunTypeView delayView = new LogicView.FunTypeView();
             delayView.frameLayout.Y = bottomY;
@@ -1072,6 +1115,7 @@
                     selectedState = "delay_" + strdelay;
                 });
             };
+            return delayView;
 
         }
 
@@ -1081,7 +1125,8 @@
         /// <param name="device"></param>
         /// <param name="button"></param>
         /// <param name="len">鏄剧ず閫夋嫨View鏁伴噺</param>
-        private void SwitchViewMethod(Entity.Function device, Button button, int len)
+        /// <param name="action">鐐瑰嚮鍥炶皟浜嬩欢锛岀敤鏉ョ粰闊充箰鍒锋柊鐣岄潰浣跨敤锛寃xr 2024-01-04 16:03:47</param>
+        private void SwitchViewMethod(Entity.Function device, Button button, int len,Action<string> action = null)
         {
             #region 鐣岄潰
             FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
@@ -1142,11 +1187,11 @@
 
                         }
                         break;
-
                 }
 
                 //鏁版嵁灏佽
                 AddDictionary(key, value);
+                action?.Invoke(value);
             });
             #endregion
         }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index d6bcd74..d925ad0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -248,6 +248,17 @@
 
                     if (sceneFunction.localFunction.spk == SPK.MusicStandard)
                     {
+                        for (var i = 0; i < sceneFunction.status.Count;)
+                        {
+                            var ddd = sceneFunction.status[i];
+                            if (string.IsNullOrEmpty(ddd.value))
+                            {
+                                sceneFunction.status.Remove(ddd);
+                                continue;
+                            }
+                            i++;
+                        }
+
                         if (sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.PlaylistName) == null)
                         {
                             if (isOnStatus)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
index f27995e..9995fae 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -225,7 +225,31 @@
                             var regionId = (string)btnHomeName.Tag;
                             dialog.Close();
                             LoadEvent_ChangeCurHome(home);
-                            LoadContentView();
+                            new System.Threading.Thread(() => {
+                                try
+                                {
+                                    while (true)
+                                    {
+                                        if (Common.ApiUtlis.Ins.DownloadDataComplete)
+                                        {
+                                            System.Threading.Thread.Sleep(100);
+                                        }
+                                        else
+                                        {
+                                            Application.RunOnMainThread(() =>
+                                            {
+                                                LoadContentView();
+                                            });
+                                            break;
+                                        }
+                                    }
+                                }
+                                catch { }
+                                {
+
+                                }
+                            }) { IsBackground = true }.Start();
+                            
                             HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home);
                         };
                     }
@@ -409,7 +433,31 @@
                     var regionId = (string)btnHomeName.Tag;
                     dialog.Close();
                     LoadEvent_ChangeCurHome(home);
-                    LoadContentView();
+                    new System.Threading.Thread(() => {
+                        try
+                        {
+                            while (true)
+                            {
+                                if (Common.ApiUtlis.Ins.DownloadDataComplete)
+                                {
+                                    System.Threading.Thread.Sleep(100);
+                                }
+                                else
+                                {
+                                    Application.RunOnMainThread(() =>
+                                    {
+                                        LoadContentView();
+                                    });
+                                    break;
+                                }
+                            }
+                        }
+                        catch { }
+                        {
+
+                        }
+                    })
+                    { IsBackground = true }.Start();
                     HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home);
                 };
             }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
index f7d63d1..2dc3048 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -446,7 +446,7 @@
                     d.Add(FunctionAttributeKey.Mode, m);
                     Control.Ins.SendWriteCommand(device, d);
                     dialog.Close();
-                    if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
+                    if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan" || device.GetAttrState(FunctionAttributeKey.Mode) == "dry")
                     {
 
                         setTempBar.IsClickable = false;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
index 2837dd2..a8048f1 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
@@ -97,9 +97,6 @@
             //    function.CollectFunction();
             //};
 
-
-           
-
             //鍥為��鍒锋柊淇℃伅浜嬩欢
             new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView_SettingIcon( () => {
                 var page = new AddGroupControlPage(function,
@@ -310,18 +307,26 @@
                 attrView.AddChidren(btnSwitchIcon);
 
                 btnSwitchIcon.MouseUpEventHandler = (sender, e) => {
+                    btnSwitchIcon.IsSelected = !btnSwitchIcon.IsSelected;
                     if (btnSwitchIcon.IsSelected)
-                    {
-                        var d = new Dictionary<string, string>();
-                        d.Add(FunctionAttributeKey.OnOff, "off");
-                        function.Control(d);
-                    }
-                    else
                     {
                         var d = new Dictionary<string, string>();
                         d.Add(FunctionAttributeKey.OnOff, "on");
                         function.Control(d);
                     }
+                    else
+                    {
+                        var d = new Dictionary<string, string>();
+                        d.Add(FunctionAttributeKey.OnOff, "off");
+                        function.Control(d);
+                    }
+                };
+
+                btnOn.MouseUpEventHandler += (sender, e) => {
+                    btnSwitchIcon.IsSelected = true;
+                };
+                btnOff.MouseUpEventHandler += (sender, e) => {
+                    btnSwitchIcon.IsSelected = false;
                 };
             }
 
@@ -835,8 +840,8 @@
 
             dimmerBar.OnProgressChangedEvent = (sender, e) =>
             {
-                btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
-                btnBrightnessText.Text = dimmerBar.Progress + "%";
+                //btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
+                //btnBrightnessText.Text = dimmerBar.Progress + "%";
                 return;
                 if (e == 0 && lastBrightness != 0)
                 {
@@ -1085,13 +1090,13 @@
 
             btnOn.MouseUpEventHandler += (sender, e) => {
                 dimmerBar.Progress = 100;
-                btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
-                btnBrightnessText.Text = dimmerBar.Progress + "%";
+                //btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
+                //btnBrightnessText.Text = dimmerBar.Progress + "%";
             };
             btnOff.MouseUpEventHandler += (sender, e) => {
                 dimmerBar.Progress = 0;
-                btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
-                btnBrightnessText.Text = dimmerBar.Progress + "%";
+                //btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
+                //btnBrightnessText.Text = dimmerBar.Progress + "%";
             };
 
 

--
Gitblit v1.8.0