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(); } /// /// 修改功能名称按钮点击事件 /// void LoadEvent_ChangeFunctionName() { EventHandler eventHandler = (sender, e) => { //创建回调事件 Action callBackAction = (name) => { if (string.IsNullOrEmpty(name)) { new Tip() { CloseTime = 1, Text = Language.StringByID(StringId.DeviceNameCannotBeEmpty), Direction = AMPopTipDirection.None, }.Show(bodyView); return; } function.name = name; btnFunctionName.Text = name; function.SaveFunctionData(true); }; new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, function.name, callBackAction,StringId.DeviceNameCannotBeEmpty,0,new System.Collections.Generic.List()); }; btnEditName.MouseUpEventHandler = eventHandler; btnFunctionName.MouseUpEventHandler = eventHandler; } /// /// 跳转到位置管理页面 /// void SkipChooseRoomPage() { EventHandler 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; } } }