From ed3bfb7462d44747230437717e8673a5192f833f Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 30 十一月 2020 20:34:51 +0800
Subject: [PATCH] 2020-11-30-2

---
 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs |   58 ++++++++++++++--------------------------------------------
 1 files changed, 14 insertions(+), 44 deletions(-)

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 98c62c1..7664076 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -12,39 +12,9 @@
         /// </summary>
         public static void LoadEvent_RefreshAir()
         {
-            if (bodyView != null)
-            {
-                bodyView.btnTempValues.Text = MainPage.cityInfo.temperature == null ? "--" : MainPage.cityInfo.temperature + "掳";
-                bodyView.btnHumidityValues.Text = MainPage.cityInfo.humidity == null ? "--" : MainPage.cityInfo.humidity + "%";
-                bodyView.btnPm25Values.Text = MainPage.cityInfo.pm25 == null ? "--" : MainPage.cityInfo.pm25;
-            }
-        }
-        /// <summary>
-        /// 纭杩炴帴鐘舵��
-        /// </summary>
-        public static void LoadEvent_CheckLinkStatus()
-        {
-            if (bodyView != null)
-            {
-                Application.RunOnMainThread(() =>
-                {
-                    if (Control.Ins.GatewayOnline)
-                    {
-                        if (Control.Ins.IsRemote)
-                        {
-                            bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipRemote;
-                        }
-                        else
-                        {
-                            bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.MainColor;
-                        }
-                    }
-                    else
-                    {
-                        bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipFail;
-                    }
-                });
-            }
+            bodyView.btnTempValues.Text = MainPage.cityInfo.temperature == null ? "--" : MainPage.cityInfo.temperature + "掳";
+            bodyView.btnHumidityValues.Text = MainPage.cityInfo.humidity == null ? "--" : MainPage.cityInfo.humidity + "%";
+            bodyView.btnPm25Values.Text = MainPage.cityInfo.pm25 == null ? "--" : MainPage.cityInfo.pm25;
         }
 
         /// <summary>
@@ -147,7 +117,7 @@
                         {
                             if (view.Tag.ToString() == function.sid)
                             {
-                                var state = function.trait_on_off.curValue.ToString() == "on";
+                                var state = function.trait_on_off.value.ToString() == "on";
                                 for (int i = 0; i < view.ChildrenCount; i++)
                                 {
                                     if (view.GetChildren(i).GetType() == typeof(Button))
@@ -188,7 +158,7 @@
             {
                 string msg = function.name + Language.StringByID(StringId.AlreadyOpened);
                 new PublicAssmebly().TipMsgAutoClose(msg, true);
-                Control.Ins.ControlScene(function as Scene);
+                Control.ins.ControlScene(function as Scene);
             };
             btnCoverd.MouseUpEventHandler = eventHandler;
             btnName.MouseUpEventHandler = eventHandler;
@@ -207,10 +177,10 @@
                 btnSwitch.IsSelected = !btnSwitch.IsSelected;
                 new System.Threading.Thread(() =>
                 {
-                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
+                    function.trait_on_off.value = btnSwitch.IsSelected ? "on" : "off";
                     System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
-                    d.Add("on_off", function.trait_on_off.curValue.ToString());
-                    Control.Ins.SendWriteCommand(function, d);
+                    d.Add("on_off", function.trait_on_off.value.ToString());
+                    Control.ins.SendWriteCommand(function, d);
                 })
                 { IsBackground = true }.Start();
             };
@@ -240,11 +210,11 @@
             btnClose.MouseUpEventHandler = (sender, e) =>
             {
                 btnClose.IsSelected = false;
-                curtain.trait_on_off.curValue = "off";
+                curtain.trait_on_off.value = "off";
                 curtain.percent = 0;
                 System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
-                d.Add("on_off",curtain.trait_on_off.curValue.ToString());
-                Control.Ins.SendWriteCommand(curtain, d);
+                d.Add("on_off",curtain.trait_on_off.value.ToString());
+                Control.ins.SendWriteCommand(curtain, d);
             };
 
             btnOpen.MouseDownEventHandler = (sender, e) =>
@@ -254,11 +224,11 @@
             btnOpen.MouseUpEventHandler = (sender, e) =>
             {
                 btnOpen.IsSelected = false;
-                curtain.trait_on_off.curValue = "on";
+                curtain.trait_on_off.value = "on";
                 curtain.percent = 100;
                 System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
-                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
-                Control.Ins.SendWriteCommand(curtain, d);
+                d.Add("on_off", curtain.trait_on_off.value.ToString());
+                Control.ins.SendWriteCommand(curtain, d);
             };
         }
 

--
Gitblit v1.8.0