using HDL_ON.UI.CSS;
|
using System;
|
using Shared;
|
using HDL_ON.Entity;
|
|
namespace HDL_ON.UI
|
{
|
public partial class FunctionBaseInfoSetPage
|
{
|
void LoadEventList()
|
{
|
LoadEvent_ChangeFunctionName ();
|
SkipChooseRoomPage();
|
}
|
|
/// <summary>
|
/// 修改功能名称按钮点击事件
|
/// </summary>
|
void LoadEvent_ChangeFunctionName()
|
{
|
EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
|
//创建回调事件
|
Action<string> callBackAction = (name) =>
|
{
|
if (string.IsNullOrEmpty(name))
|
{
|
new Tip()
|
{
|
CloseTime = 3,
|
Text = Language.StringByID(StringId.DeviceNameCannotBeEmpty),
|
Direction = AMPopTipDirection.None,
|
}.Show(bodyView);
|
return;
|
}
|
|
function.name = name;
|
btnFunctionName.Text = name;
|
function.SaveFunctionData();
|
};
|
new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, function.name, callBackAction,StringId.DeviceNameCannotBeEmpty,0,new System.Collections.Generic.List<string>());
|
};
|
btnEditName.MouseUpEventHandler = eventHandler;
|
btnFunctionName.MouseUpEventHandler = eventHandler;
|
}
|
|
/// <summary>
|
/// 跳转到位置管理页面
|
/// </summary>
|
void SkipChooseRoomPage()
|
{
|
EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
|
{
|
//修改功能所属房间之后的回调事件
|
Action chooseRoomBackAction = () => {
|
btnLocationValues.Text = function.GetRoomListName();
|
};
|
var view = new ChooseRoomPage(function,chooseRoomBackAction);
|
MainPage.BasePageView.AddChidren(view);
|
view.LoadPage();
|
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
|
};
|
btnLocationInfoRight.MouseUpEventHandler = eventHandler;
|
btnLocationValues.MouseUpEventHandler = eventHandler;
|
}
|
}
|
}
|