| | |
| | | #endregion |
| | | |
| | | #region UI显示 |
| | | /// <summary>
|
| | | /// UI显示 |
| | | /// <summary> |
| | | /// UI显示 |
| | | /// </summary> |
| | | public void Show() |
| | | { |
| | |
| | | EventHandler<MouseEventArgs> eHandlerBack = (sender, e) => |
| | | { |
| | | RemoveFromParent(); |
| | | UserDoorLockPage.canShowDialog = true; |
| | | //暂时不考虑下级界面等推送导致常开模式失效的问题 |
| | | //var userDoorLockPage = new UserDoorLockPage(currentRoom, deviceUI); |
| | | //HomePage.Instance.AddChidren(userDoorLockPage); |
| | | //HomePage.Instance.PageIndex += 1; |
| | | //userDoorLockPage.Show(); |
| | | }; |
| | | this.btnBack.MouseUpEventHandler += eHandlerBack; |
| | | this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack; |
| | |
| | | string caption = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm); |
| | | string deviceName = Common.LocalDevice.Current.GetDeviceMacName(doorLock); |
| | | var btnNote = new FrameCaptionInputControl(caption, deviceName, listview.rowSpace / 2); |
| | | btnNote.txtInput.MaxByte = 48;//限制只能输入48个字节 |
| | | listview.AddChidren(btnNote); |
| | | btnNote.InitControl(); |
| | | //划线 |
| | |
| | | var listCheck = new List<string>(); |
| | | rowBeloneArea.SelectRoomEvent += (roomKeys) => |
| | | { |
| | | //选择未分配时,清空
|
| | | //选择未分配时,清空 |
| | | if (roomKeys == string.Empty) { listCheck = new List<string>(); } |
| | | foreach (var device in this.listNewDevice) |
| | | {
|
| | | if (roomKeys == string.Empty)
|
| | | {
|
| | | //如果选择的是未分配,则它的全部回路无条件全部清空房间
|
| | | HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
|
| | | continue;
|
| | | { |
| | | if (roomKeys == string.Empty) |
| | | { |
| | | //如果选择的是未分配,则它的全部回路无条件全部清空房间 |
| | | HdlRoomLogic.Current.ChangedRoom(device, roomKeys); |
| | | continue; |
| | | } |
| | | var room = HdlRoomLogic.Current.GetRoomByDevice(device); |
| | | string mainKeys = LocalDevice.Current.GetDeviceMainKeys(device); |
| | |
| | | } |
| | | } |
| | | //保存设备房间索引 |
| | | Common.LocalDevice.Current.SaveRealDeviceRoomId(this.listNewDevice, roomKeys); |
| | | HdlRoomLogic.Current.SaveRealDeviceRoomId(this.listNewDevice, roomKeys); |
| | | }; |
| | | |
| | | //设备模块 |
| | |
| | | /// 设备重命名 |
| | | /// </summary> |
| | | /// <param name="i_deviceName">deviceName.</param> |
| | | private async void DeviceReName(string i_deviceName, bool closeForm) |
| | | private void DeviceReName(string i_deviceName, bool closeForm) |
| | | { |
| | | //开启进度条 |
| | | this.ShowProgressBar(); |
| | | |
| | | //修改MAC名 |
| | | string deviceName = i_deviceName.Trim(); |
| | | var result = await Common.LocalDevice.Current.ReMacName(listNewDevice, deviceName); |
| | | var result = Common.LocalDevice.Current.ReMacName(listNewDevice, deviceName); |
| | | //关闭进度条 |
| | | this.CloseProgressBar(); |
| | | |