From 21736b2944d5e88cd705a39ff87fd73d5a16e609 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期六, 09 五月 2020 11:06:35 +0800 Subject: [PATCH] 安川 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs index cf2a242..774d509 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs @@ -45,6 +45,9 @@ listNewDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac)); } + //娣诲姞鏂拌澶囩殑璇�,涓婚〉闇�瑕侀噸鏂板埛鏂� + UserView.UserPage.Instance.RefreshForm = true; + //璁剧疆鏍囬淇℃伅 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice)); @@ -55,6 +58,8 @@ this.SetAllEpointName(); // 璁剧疆缃戝叧鎵�鍦ㄧ殑鏃跺尯鐨勬椂闂寸粰闂ㄩ攣鏃堕棿 this.SetDoorTime(); + //鏂板叆缃戠殑璁惧,娓呯┖鎺夊畠鐨勬埧闂� + this.ClearDeviceFromRoom(); } /// <summary> @@ -306,6 +311,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> -- Gitblit v1.8.0