using System; using HDL_ON.Entity; namespace HDL_ON.UI { public partial class CurtainModulePage { void LoadEventList() { LoadCollectionEvent(); LoadEvent_ControlEvent(); //回退刷新信息事件 actionRefresh = () => { btnFunctionName.Text = btnFunctionName_Out.Text = function.name; btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName(); }; } /// /// 收藏功能按钮事件 /// void LoadCollectionEvent() { btnCollection.MouseUpEventHandler += (sender, e) => { btnCollection.IsSelected = function.collection = btnCollection_Out.IsSelected = !btnCollection.IsSelected; DB_ResidenceData.residenceData.SaveResidenceData(); }; } /// /// 加载窗帘开关停按钮控制事件 /// void LoadEvent_ControlEvent() { btnCurtainClose.MouseDownEventHandler += (sender, e) => { btnCurtainClose.IsSelected = true; }; btnCurtainClose.MouseUpEventHandler += (sender, e) => { btnCurtainClose.IsSelected = false; }; btnCurtainStop.MouseDownEventHandler += (sender, e) => { btnCurtainStop.IsSelected = true; }; btnCurtainStop.MouseUpEventHandler += (sender, e) => { btnCurtainStop.IsSelected = false; }; btnCurtainOpen.MouseDownEventHandler += (sender, e) => { btnCurtainOpen.IsSelected = true; }; btnCurtainOpen.MouseUpEventHandler += (sender, e) => { btnCurtainOpen.IsSelected = false; }; } } }