From 8983da138cb92e35b0bbeaece1cf1c454a5a79d4 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 01 十二月 2020 16:31:28 +0800
Subject: [PATCH] 20201201

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

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 98c62c1..261d808 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -50,12 +50,12 @@
         /// <summary>
         /// 鍔犺浇鍔熻兘鏀惰棌鎸夐挳浜嬩欢
         /// </summary>
-        void LoadEvent_FunctionCollection(Button btn,Function function,bool isDevice)
+        void LoadEvent_FunctionCollection(Button btn,Function function)
         {
             btn.MouseUpEventHandler += (sender, e) =>
             {
-                function.collection = false;
-                if(function.functionCategory == FunctionCategory.Music)//澶勭悊闊充箰涓讳粠鍏崇郴
+                function.collect = false;
+                if (function.functionCategory == FunctionCategory.Music)//澶勭悊闊充箰涓讳粠鍏崇郴
                 {
                     if ((function as Music.A31MusicModel).ServerClientType == 1)
                     {
@@ -64,15 +64,22 @@
                     }
                 }
                 string msg = function.name + Language.StringByID(StringId.CollectionCancelled);
-                if (isDevice)
-                {
-                    LoadDeviceFunctionControlZone();
-                }
-                else
-                {
-                    LoadSceneFunctionControlZone();
-                }
+                LoadDeviceFunctionControlZone();
                 function.SaveFunctionData();
+                new PublicAssmebly().TipMsgAutoClose(msg, true);
+            };
+        }
+        /// <summary>
+        /// 鍔犺浇鍦烘櫙鏀惰棌鎸夐挳浜嬩欢
+        /// </summary>
+        void LoadEvent_SceneCollection(Button btn, Scene scene)
+        {
+            btn.MouseUpEventHandler += (sender, e) =>
+            {
+                scene.collect = false;
+                string msg = scene.name + Language.StringByID(StringId.CollectionCancelled);
+                LoadSceneFunctionControlZone();
+                scene.SaveSceneData();
                 new PublicAssmebly().TipMsgAutoClose(msg, true);
             };
         }
@@ -181,14 +188,14 @@
         /// <summary>
         /// 鍔犺浇鍦烘櫙鎺у埗浜嬩欢
         /// </summary>
-        void LoadEvent_ControlScene(Button btnCoverd,Button btnName,Button btnZone ,Function function)
+        void LoadEvent_ControlScene(Button btnCoverd,Button btnName,Button btnZone ,Scene scene)
         {
           
             EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
             {
-                string msg = function.name + Language.StringByID(StringId.AlreadyOpened);
+                string msg = scene.name + Language.StringByID(StringId.AlreadyOpened);
                 new PublicAssmebly().TipMsgAutoClose(msg, true);
-                Control.Ins.ControlScene(function as Scene);
+                Control.Ins.ControlScene(scene);
             };
             btnCoverd.MouseUpEventHandler = eventHandler;
             btnName.MouseUpEventHandler = eventHandler;

--
Gitblit v1.8.0