From ae95e3f4b9cbc1e7be2773068e28e2ac911c48c4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期一, 28 十月 2024 10:39:15 +0800
Subject: [PATCH] 默认服务器

---
 HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs         |    2 +-
 HDL_ON/UI/UI1-Login/RegisterPageBLL.cs                              |    2 ++
 HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs |    4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs b/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs
index 6579b0d..5024c0e 100644
--- a/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs
+++ b/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs
@@ -247,8 +247,8 @@
             int XX = this.X + this.m_SeekBarPadding;
             //褰撳墠婊戞潯鎵�鍦ㄧ殑澶ц嚧鐧惧垎姣�
             int tempValue = this.Progress - this.m_MinValue;
-            if (tempValue < 0) { tempValue = 0; }
-            decimal persent = (decimal)tempValue / (this.m_MaxValue - this.m_MinValue);
+            if (tempValue < 0) { tempValue = 0; }
+            decimal persent = (decimal)tempValue / ((this.m_MaxValue - this.m_MinValue) == 0 ? 1 : (this.m_MaxValue - this.m_MinValue));
             //褰撳墠婊戞潯鎵�鍦ㄧ殑澶ц嚧浣嶇疆
             XX += (int)((this.Width - this.m_SeekBarPadding * 2) * persent);
             //鍥犱负瑕佸眳涓�,鎵�浠ュ噺鎺夎嚜瀹氫箟鎺т欢鐨勫搴︾殑涓�鑸�
diff --git a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
index d055779..9f32abc 100644
--- a/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/RegisterPageBLL.cs
@@ -821,6 +821,7 @@
                                         if (server != null)
                                         {
                                             OnAppConfig.Instance.GlobalRegion = server;
+                                            OnAppConfig.Instance.RequestHttpsHost = server.regionUrl;
                                             SetServerText();
                                         }
                                     }
@@ -830,6 +831,7 @@
                                         if (server != null)
                                         {
                                             OnAppConfig.Instance.GlobalRegion = server;
+                                            OnAppConfig.Instance.RequestHttpsHost = server.regionUrl;
                                             SetServerText();
                                         }
                                     }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
index d5c0ef9..8adde59 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
@@ -787,7 +787,7 @@
             //褰撳墠婊戞潯鎵�鍦ㄧ殑澶ц嚧鐧惧垎姣�
             int tempValue = this.Progress - this.m_MinValue;
             if (tempValue < 0) { tempValue = 0; }
-            decimal persent = (decimal)tempValue / (this.m_MaxValue - this.m_MinValue);
+            decimal persent = (decimal)tempValue / ((this.m_MaxValue - this.m_MinValue) == 0 ? 1 : (this.m_MaxValue - this.m_MinValue));
             //褰撳墠婊戞潯鎵�鍦ㄧ殑澶ц嚧浣嶇疆
             XX += (int)((this.Width - this.m_SeekBarPadding * 2) * persent);
             //鍥犱负瑕佸眳涓�,鎵�浠ュ噺鎺夎嚜瀹氫箟鎺т欢鐨勫搴︾殑涓�鑸�

--
Gitblit v1.8.0