From 2d2a945aa0b848040266025b411cca94c6af7c5f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 27 十二月 2023 13:29:04 +0800
Subject: [PATCH] 能源模块加载异常问题修复

---
 HDL-ON_Android/Properties/AndroidManifest.xml                 |    2 
 HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs |   63 ++++++++++++++++++++++++++-----
 HDL_ON/UI/UI1-Login/LoginPage.cs                              |    7 ++-
 HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs     |    2 
 4 files changed, 59 insertions(+), 15 deletions(-)

diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 89b127e..77b3d90 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="202312081">
+<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="202312251">
 	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
 	<uses-permission android:name="android.permission.RECEIVE_SMS" />
 	<!--鍙嬬洘-->
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index dde7691..de1cf2e 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -318,7 +318,6 @@
                     //etAccount.Text = "18321091245";
                     //etAccount.Text = "13751916353";
                     etAccount.Text = "13549566666";
-                    etAccount.Text = "support7@hdlautomation.com";
                     etAccount.Text = "13375012446";//娴嬭瘯鏈嶅姟鍣�
                     etAccount.Text = "15855403939";
                     etAccount.Text = "15006564444";
@@ -333,6 +332,8 @@
                     etAccount.Text = "support7@hdlautomation.com";
                     etAccount.Text = "13922115008";//鍒樻��
                     etAccount.Text = "1272061968@qq.com";
+                    etAccount.Text = "support7@hdlautomation.com";
+                    etAccount.Text = "info@hdlegypt.com";
 
 
                 }
@@ -365,9 +366,9 @@
                 }
                 b = !b;
                 etPassword.Text = "123456";
-                if(etAccount.Text == "pjh@hdlchina.com.cn")
+                if(etAccount.Text == "info@hdlegypt.com")
                 {
-                    etPassword.Text = "hdl123";
+                    etPassword.Text = "@Hdl2020";
                 }
                 else if(etAccount.Text == "18600200915")
                 {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
index 0d4740a..e3e0903 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -186,7 +186,7 @@
                 string key = ene.name;
                 if (list.ContainsKey(key))
                 {
-                    list.Add(ene.name + DateTime.Now.ToLongTimeString(), tt.ToString());
+                    list.Add(ene.name + DateTime.Now.Ticks, tt.ToString());
                 }
                 else
                 {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
index cc7b21a..2837dd2 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
@@ -219,7 +219,7 @@
             var btnOnText = new Button()
             {
                 X = Application.GetRealWidth(100-9),
-                Y = Application.GetRealHeight(500),
+                Y = Application.GetRealHeight(495),
                 Width = Application.GetMinRealAverage(50),
                 Height = Application.GetMinRealAverage(32),
                 TextColor = CSS_Color.TextualColor,
@@ -242,7 +242,7 @@
             var btnOffText = new Button()
             {
                 X = Application.GetRealWidth(180 - 9),
-                Y = Application.GetRealHeight(500),
+                Y = Application.GetRealHeight(495),
                 Width = Application.GetMinRealAverage(50),
                 Height = Application.GetMinRealAverage(32),
                 TextColor = CSS_Color.TextualColor,
@@ -284,15 +284,15 @@
 
             if (hadRGB)
             {
-                LoadRgbAttrView(hadCCT,hadColorful);
+                LoadRgbAttrView(hadCCT,hadColorful,btnOn,btnOff);
             }
             else if (hadCCT)
             {
-                LoadCctAttrView(attrView);
+                LoadCctAttrView(attrView, btnOn, btnOff);
             }
             else if (hadDimming)
             {
-                LoadDimmingAttrView(attrView);
+                LoadDimmingAttrView(attrView, btnOn, btnOff);
             }
             else
             {
@@ -334,7 +334,7 @@
         /// 鍔犺浇璋冨厜灞炴�ц缃帶浠�
         /// </summary>
         /// <param name="attrView"></param>
-        void LoadDimmingAttrView(VerticalScrolViewLayout attrView)
+        void LoadDimmingAttrView(VerticalScrolViewLayout attrView,Button btnOn,Button btnOff)
         {
 
 
@@ -425,6 +425,20 @@
 
             };
 
+
+
+            btnOn.MouseUpEventHandler += (sender, e) => {
+                dimmerBar.Progress = 100;
+                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 + "%";
+            };
+
+
         }
         int lastBrightness = 0;
 
@@ -432,7 +446,7 @@
         /// 鍔犺浇cct灞炴�ц缃帶浠�
         /// </summary>
         /// <param name="attrView"></param>
-        void LoadCctAttrView(VerticalScrolViewLayout attrView)
+        void LoadCctAttrView(VerticalScrolViewLayout attrView,Button btnOn,Button btnOff)
         {
             attrView.AddChidren(new Button
             {
@@ -483,6 +497,8 @@
 
             dimmerBar.OnProgressChangedEvent = (sender, e) =>
             {
+                btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
+                btnBrightnessText.Text = dimmerBar.Progress + "%";
                 return;
                 if (e == 0 && lastBrightness != 0)
                 {
@@ -517,8 +533,6 @@
                 }
 
 
-                btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
-                btnBrightnessText.Text = dimmerBar.Progress + "%";
             };
 
       
@@ -616,13 +630,29 @@
             cctView.AddChidren(btnTempClolorMax);
 
             #endregion
+
+
+
+
+            btnOn.MouseUpEventHandler += (sender, e) => {
+                dimmerBar.Progress = 100;
+                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 + "%";
+            };
+
+
         }
 
         /// <summary>
         /// 鍔犺浇rgb灞炴�ц缃帶浠�
         /// </summary>
         /// <param name="attrView"></param>
-        void LoadRgbAttrView(bool hadCCT,bool hadColorful)
+        void LoadRgbAttrView(bool hadCCT,bool hadColorful,Button btnOn,Button btnOff)
         {
             Light lightTemp = new Light();
             int magriHeight = 0;
@@ -805,6 +835,8 @@
 
             dimmerBar.OnProgressChangedEvent = (sender, e) =>
             {
+                btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100);
+                btnBrightnessText.Text = dimmerBar.Progress + "%";
                 return;
                 if (e == 0 && lastBrightness != 0)
                 {
@@ -1051,6 +1083,17 @@
                 #endregion
             }
 
+            btnOn.MouseUpEventHandler += (sender, e) => {
+                dimmerBar.Progress = 100;
+                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 + "%";
+            };
+
 
 
         }

--
Gitblit v1.8.0