From 8aa777aedd7492b7f2e28a172c2874f4ee7366a1 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 18 三月 2022 10:46:27 +0800
Subject: [PATCH] 暂时移除离线功能

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

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 0bbd7a4..aa6c95d 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -10,6 +10,52 @@
     public partial class HomePage
     {
         /// <summary>
+        /// 鏇存柊璁惧鍦ㄧ嚎鐘舵��
+        /// </summary>
+        public static void LoadEvent_RefreshDevcieOnline(Function function)
+        {
+            Application.RunOnMainThread(() =>
+            {
+                if (bodyView != null)
+                {
+                    foreach (var view in bodyView.functionViews)
+                    {
+                        if (view.Tag.ToString() == function.sid)
+                        {
+                            for (int i = 0; i < view.ChildrenCount; i++)
+                            {
+                                if (view.GetChildren(i).GetType() == typeof(Button))
+                                {
+                                    var btn = view.GetChildren(i) as Button;
+                                    if(btn.Tag == null)
+                                    {
+                                        continue;
+                                    }
+                                    if (btn.Tag.ToString() == function.sid)
+                                    {
+                                        if (function.online2d)
+                                        {
+                                            btn.UnSelectedImagePath = "Collection/Functionbg.png";
+                                            btn.IsSelected = false;
+                                        }
+                                        else
+                                        {
+                                            btn.UnSelectedImagePath = "Collection/FunctionOfflineBg.png";
+                                            btn.IsSelected = false;
+                                        }
+                                    }
+                                    else if (btn.Tag.ToString() == "OnlineTag")
+                                    {
+                                        btn.Visible = !function.online2d;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            });
+        }
+        /// <summary>
         /// 鏇存柊涓婚〉澶╂皵
         /// </summary>
         public static void LoadEvent_RefreshAir()
@@ -468,7 +514,7 @@
         {
             btnSwitch.MouseUpEventHandler = (sender, e) =>
             {
-                if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+                if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣�
                 {
                     new Tip()
                     {
@@ -531,7 +577,7 @@
         {
             btnSwitch.MouseUpEventHandler = (sender, e) =>
             {
-                if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+                if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣�
                 {
                     new Tip()
                     {
@@ -575,7 +621,7 @@
         {
             btnClose.MouseUpEventHandler = (sender, e) =>
             {
-                if (!curtain.online)//绂荤嚎涓嶅厑璁告搷浣�
+                if (!curtain.online2d)//绂荤嚎涓嶅厑璁告搷浣�
                 {
                     new Tip()
                     {
@@ -595,7 +641,7 @@
 
             btnOpen.MouseUpEventHandler = (sender, e) =>
             {
-                if (!curtain.online)//绂荤嚎涓嶅厑璁告搷浣�
+                if (!curtain.online2d)//绂荤嚎涓嶅厑璁告搷浣�
                 {
                     new Tip()
                     {
@@ -625,7 +671,7 @@
             };
             btnUp.MouseUpEventHandler = (sender, e) =>
             {
-                if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+                if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣�
                 {
                     new Tip()
                     {
@@ -656,7 +702,7 @@
             };
             btnDown.MouseUpEventHandler = (sender, e) =>
             {
-                if (!function.online)//绂荤嚎涓嶅厑璁告搷浣�
+                if (!function.online2d)//绂荤嚎涓嶅厑璁告搷浣�
                 {
                     new Tip()
                     {

--
Gitblit v1.8.0