| | |
| | | { |
| | | LoadEvent_ChangeFunctionName (); |
| | | SkipChooseRoomPage(); |
| | | DelDeviceEvent(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | //修改功能所属房间之后的回调事件 |
| | | Action chooseRoomBackAction = () => { |
| | | btnLocationValues.Text = function.GetRoomListName(); |
| | | try |
| | | { |
| | | btnLocationValues.Text = function.GetRoomListName(); |
| | | } |
| | | catch { } |
| | | }; |
| | | var view = new ChooseRoomPage(function,chooseRoomBackAction); |
| | | MainPage.BasePageView.AddChidren(view); |
| | |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 解绑设备的事件 |
| | | /// </summary> |
| | | void DelDeviceEvent() |
| | | { |
| | | |
| | | EventHandler<MouseEventArgs> ClickEvent = (sener, e) => |
| | | { |
| | | new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () => |
| | | { |
| | | UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.DelDevice(this.function, (isBool) => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!isBool) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.delFail), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | //删除本地文件 |
| | | UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DeleteFunction(this.function); |
| | | this.RemoveFromParent(); |
| | | this.actionDel?.Invoke(); |
| | | }); |
| | | |
| | | }); |
| | | |
| | | }); |
| | | }; |
| | | this.delView.MouseUpEventHandler += ClickEvent; |
| | | this.delTextBtn.MouseUpEventHandler += ClickEvent; |
| | | this.delRightBtn.MouseUpEventHandler += ClickEvent; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |