xm
2020-05-07 c1de48884fa145a16a0f8bcee93274dcfaa0ff82
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
@@ -53,8 +53,10 @@
            //设置全部回路的默认名字
            this.SetAllEpointName();
            //保存门锁时间
            this.SaveDoorTime();
            // 设置网关所在的时区的时间给门锁时间
            this.SetDoorTime();
            //新入网的设备,清空掉它的房间
            this.ClearDeviceFromRoom();
        }
        /// <summary>
@@ -179,6 +181,8 @@
            btnHelp.Text = Language.StringByID(R.MyInternationalizationString.uMoreSettion);
            btnHelp.ButtonClickEvent += (sender, e) =>
            {
                //更改过一次之后,则界面关闭后不再更改
                this.saveDefultName = string.Empty;
                //改名字
                btnNote.txtInput.FinishInputEvent();
@@ -235,6 +239,8 @@
            detailBackFrame.AddChidren(btnFinish);
            btnFinish.MouseUpEventHandler += (sender, e) =>
            {
                //更改过一次之后,则界面关闭后不再更改
                this.saveDefultName = string.Empty;
                //改名字
                btnNote.txtInput.FinishInputEvent();
                //关闭自身
@@ -283,9 +289,9 @@
        }
        /// <summary>
        /// 保存门锁时间
        /// 设置网关所在的时区的时间给门锁时间
        /// </summary>
        private async void SaveDoorTime()
        private async void SetDoorTime()
        {
            //如果是门锁
            if (this.listNewDevice[0].Type == DeviceType.DoorLock)
@@ -302,6 +308,23 @@
        #endregion
        #region ■ 一般方法___________________________
        /// <summary>
        /// 新入网的设备,清空掉它的房间
        /// </summary>
        private void ClearDeviceFromRoom()
        {
            foreach (var device in this.listNewDevice)
            {
                HdlRoomLogic.Current.DeleteDevice(device);
                HdlRoomLogic.Current.DeleteLoveDevice(device);
            }
            Common.LocalDevice.Current.DeleteRealDeviceFromRoom(this.listNewDevice[0]);
        }
        #endregion
        #region ■ 画面关闭___________________________
        /// <summary>