using System;
|
using HDL_ON.Entity;
|
|
namespace HDL_ON.UI
|
{
|
public partial class RollingShutterPage
|
{
|
/// <summary>
|
/// 加载事件列表
|
/// </summary>
|
void LoadEventList()
|
{
|
LoadEvent_ControlEvent();
|
LoadCollectionEvent();
|
|
//回退刷新信息事件
|
actionRefresh = () => {
|
btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
|
btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
|
};
|
}
|
/// <summary>
|
/// 收藏功能按钮事件
|
/// </summary>
|
void LoadCollectionEvent()
|
{
|
btnCollection.MouseUpEventHandler += (sender, e) => {
|
btnCollection.IsSelected = function.collection = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
|
DB_ResidenceData.residenceData.SaveResidenceData();
|
};
|
}
|
|
/// <summary>
|
/// 加载窗帘开关停按钮控制事件
|
/// </summary>
|
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;
|
};
|
|
}
|
}
|
}
|