From 330e3ae4cdd1e9facb14b6ea2b3e609166c04fd3 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 12 一月 2021 16:00:27 +0800
Subject: [PATCH] 2021-1-12-1

---
 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index de323c9..e51c591 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -88,7 +88,7 @@
             btn.MouseUpEventHandler += (sender, e) =>
             {
                 function.collect = false;
-                if (function.functionCategory == FunctionCategory.Music)//澶勭悊闊充箰涓讳粠鍏崇郴
+                if (function.Spk_Prefix == FunctionCategory.Music)//澶勭悊闊充箰涓讳粠鍏崇郴
                 {
                     if ((function as Music.A31MusicModel).ServerClientType == 1)
                     {
@@ -177,7 +177,7 @@
         /// </summary>
         public static void UpdataFunctionStates(Function function)
         {
-            Application.RunOnMainThread(() =>
+            Application.RunOnMainThread((Action)(() =>
             {
                 try
                 {
@@ -196,13 +196,16 @@
                                         btn.IsSelected = state;
                                         if (btn.Tag != null && btn.Tag.ToString() == "state")
                                         {
-                                            if (function.functionCategory == FunctionCategory.Music)
+                                            if (function.Spk_Prefix == FunctionCategory.Music)
                                             {
                                                 btn.Text = (function as Music.A31MusicModel).A31PlayStatus.Title;
                                             }
                                             else
                                             {
-                                                btn.Text = function.lastState;
+                                                if (function.spk != SPK.LightSwitch)
+                                                {
+                                                    btn.Text = function.lastState;
+                                                }
                                             }
                                         }
                                     }
@@ -215,7 +218,7 @@
                 {
                     MainPage.Log($"HomePage updata funciton states error {ex.Message}");
                 }
-            });
+            }));
         }
 
         /// <summary>

--
Gitblit v1.8.0