From 7b60238359b94125d591678eff105ae2bf47843f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 15 十一月 2019 13:16:21 +0800
Subject: [PATCH] 2019.11.15
---
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
index 991b648..b894572 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
@@ -96,6 +96,36 @@
//鍒掔嚎
btnType.AddBottomLine();
+ //鎵�灞炲尯鍩�
+ var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
+ listview.AddChidren(rowBeloneArea);
+ rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uBelongArea), this.listNewDevice);
+ //搴曠嚎
+ rowBeloneArea.AddBottomLine();
+
+ var listCheck = new List<string>();
+ rowBeloneArea.SelectRoomEvent += (roomKeys) =>
+ {
+ foreach (var device in this.listNewDevice)
+ {
+ var room = Common.Room.CurrentRoom.GetRoomByDevice(device);
+ string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
+ if (room == null)
+ {
+ //杩欓噷鏈夌偣鐗规畩,濡傛灉鍥炶矾娌℃湁璁剧疆鏈夊尯鍩熺殑鏃跺��,鎵嶈缃�
+ listCheck.Add(mainKeys);
+ Common.Room.CurrentRoom.ChangedRoom(device, roomKeys);
+ }
+ else if (listCheck.Contains(mainKeys) == true)
+ {
+ //濡傛灉杩欎釜鍥炶矾涔嬪墠閮借繕娌℃湁鍖哄煙,鍦ㄦ湰鐣岄潰杩樻病鏈夊叧闂箣鍓�,鍙互鏃犳潯浠堕殢渚垮彉鏇�
+ Common.Room.CurrentRoom.ChangedRoom(device, roomKeys);
+ }
+ }
+ //淇濆瓨璁惧鎴块棿绱㈠紩
+ Common.LocalDevice.Current.SaveRealDeviceRoomId(this.listNewDevice, roomKeys);
+ };
+
//鏇村閰嶇疆
var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(49), false);
btnHelp.Y = Application.GetRealHeight(1388);
@@ -237,7 +267,7 @@
}
//娣诲姞璁惧鍒板垪琛�
this.LoadFormMethodByName("DeviceListMainForm", "AddDeviceToFormTable", listNewDevice[0].DeviceAddr);
-
+
base.CloseForm();
}
#endregion
--
Gitblit v1.8.0