From 4a5e9d0447aae9b264a98ea1f4c95417d0f4aa91 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 01 十二月 2020 17:20:01 +0800 Subject: [PATCH] Merge branch 'master' into WJC --- HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 53 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 39 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..1441781 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; @@ -262,5 +269,23 @@ }; } + /// <summary> + /// 鍔犺浇璺宠浆淇℃伅涓績椤甸潰 + /// </summary> + void LoadEvent_GotoMessageCenterPage() + { + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + var skipPage = new MessageCenterPage(); + MainPage.BasePageView.AddChidren(skipPage); + skipPage.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + btnMsgBg.MouseUpEventHandler = eventHandler; + btnMsgTime.MouseUpEventHandler = eventHandler; + btnMsg.MouseUpEventHandler = eventHandler; + btnMsgIcon.MouseUpEventHandler = eventHandler; + } + } } -- Gitblit v1.8.0