From 1a0a7f736c6d2e7129e7591d40bed67ec7c0f09a Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 05 二月 2021 10:47:42 +0800
Subject: [PATCH] 2021-02-05 1.编译冲突修改

---
 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs |   21 ++++++++++++++++-----
 1 files changed, 16 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..8bb6b2a 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)
                     {
@@ -133,7 +133,15 @@
                 btnChangeScene.IsBold = false;
                 CurShowTypeIsFunction = true;
                 contentView.PageIndex = 0;
+
             };
+
+            //var client = new BlufiClient();
+            //client.PostPackageLengthLimit = 128;
+            //client.RequestDeviceScan();
+            //client.RequestDeviceStatus();
+            //client.BlufiDelegate.Blufi_DidReceiveDeviceScanResponse();
+
 
             btnChangeScene.MouseUpEventHandler = (sender, e) =>
             {
@@ -177,7 +185,7 @@
         /// </summary>
         public static void UpdataFunctionStates(Function function)
         {
-            Application.RunOnMainThread(() =>
+            Application.RunOnMainThread((Action)(() =>
             {
                 try
                 {
@@ -196,13 +204,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 +226,7 @@
                 {
                     MainPage.Log($"HomePage updata funciton states error {ex.Message}");
                 }
-            });
+            }));
         }
 
         /// <summary>

--
Gitblit v1.8.0