From 2b9a266168793da88a6e615fb961c254698dc12c Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 23 三月 2022 15:36:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/release0123' into wjc

---
 HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 46 insertions(+), 1 deletions(-)

diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
index 09b860a..db8ee37 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -1,5 +1,6 @@
 锘縰sing System;
 using HDL_ON.Entity;
+using HDL_ON.UI.CSS;
 using Shared;
 
 namespace HDL_ON.UI
@@ -16,7 +17,7 @@
         /// <param name="updataFunction"></param>
         public void UpdataStates(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView, Room room = null)
         {
-            Application.RunOnMainThread((Action)(() =>
+            Application.RunOnMainThread((() =>
             {
                 try
                 {
@@ -181,5 +182,49 @@
                 }
             }));
         }
+
+        public void UpdataOnlineStatus(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView, Room room = null)
+        {
+            Application.RunOnMainThread(() =>
+            {
+                try
+                {
+                    if (view == null || scrolView == null || updataFunction == null)
+                    {
+                        return;
+                    }
+                    if (!scrolView.ScrollEnabled)
+                    {
+                        return;
+                    }
+                    if (room != null)
+                    {
+                        if (!updataFunction.roomIds.Contains(room.roomId))
+                        {
+                            return;
+                        }
+                    }
+                    for (int i = 0; i < scrolView.ChildrenCount; i++)
+                    {
+                        if (scrolView.GetChildren(i).Tag == null || scrolView.GetChildren(i).Tag.ToString() == "")
+                        {
+                            continue;
+                        }
+                        var viewTag = scrolView.GetChildren(i).Tag.ToString();
+                        if (scrolView.GetChildren(i).Tag != null && viewTag == updataFunction.spk + updataFunction.sid)
+                        {
+                            if (scrolView.GetChildren(i).GetType() == typeof(FunctionControlZone)) {
+                                var fcView = scrolView.GetChildren(i) as FunctionControlZone;
+                                //fcView.UpdataOnline(updataFunction.online);
+                            }
+                        }
+                    }
+                }catch (Exception ex)
+                {
+                    MainPage.Log("Function Online status error : " + ex.Message);
+                }
+            });
+        }
+
     }
 }
\ No newline at end of file

--
Gitblit v1.8.0