From 0bf9e65bc3ba98391e7835c922b15baab3c77876 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 01 六月 2020 14:59:39 +0800
Subject: [PATCH] 上传一个合并的版本

---
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 51 insertions(+), 5 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
index 2582d09..db710c9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -15,7 +15,7 @@
         /// <summary>
         /// 鍒楄〃鎺т欢
         /// </summary>
-        private VerticalListControl listview = null;
+        private FrameListControl listview = null;
         /// <summary>
         /// 褰撳墠閫夋嫨鐨勭綉鍏�
         /// </summary>
@@ -51,15 +51,19 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
+            var listBackControl = new VerticalFrameControl();
+            listBackControl.Height = bodyFrameLayout.Height;
+            bodyFrameLayout.AddChidren(listBackControl);
+
             //鍒濆鍖栨甯�
             var tableContr = new InformationEditorControl();
-            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 369, 1368);
+            this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 1368);
 
             //鍥剧墖
             var btnPic = new DeviceInfoIconControl();
             btnPic.Y = Application.GetRealHeight(92);
             btnPic.Gravity = Gravity.CenterHorizontal;
-            bodyFrameLayout.AddChidren(btnPic);
+            listBackControl.frameTable.AddChidren(btnPic);
             btnPic.InitControl(this.zbGateway);
 
             //璁惧澶囨敞
@@ -104,6 +108,48 @@
                 //鍙樻洿缃戝叧鎴块棿
                 HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys);
             };
+
+            //鎵�灞炰綇瀹�
+            caption = Language.StringByID(R.MyInternationalizationString.uBelongResidence);
+            var btnBeloneArea = new FrameCaptionViewControl(caption, Common.Config.Instance.Home.Name, listview.rowSpace / 2);
+            btnBeloneArea.UseClickStatu = false;
+            listview.AddChidren(btnBeloneArea);
+            btnBeloneArea.InitControl();
+            //鍒掔嚎
+            btnBeloneArea.AddBottomLine();
+
+            //mini缃戝叧鏈変釜鍔熻兘璁剧疆
+            if (this.zbGateway.getGwInfo != null && this.zbGateway.getGwInfo.LinuxImageType == 11)
+            {
+                var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(HdlGatewayLogic.Current.GetGatewayId(this.zbGateway));
+                CommonDevice miniDevice = null;
+                foreach (var device in listDevice)
+                {
+                    //鑾峰彇杩欎釜缃戝叧涓嬬殑灏忓鐏澶�
+                    if (Common.LocalDevice.Current.IsMiniLight(device) == true)
+                    {
+                        miniDevice = device;
+                        break;
+                    }
+                }
+                //濡傛灉鎵惧緱鍒扮殑璇�
+                if (miniDevice != null)
+                {
+                    //鍔熻兘璁剧疆
+                    var rowFunction = new RowLayoutControl(listview.rowSpace / 2);
+                    listview.AddChidren(rowFunction);
+                    rowFunction.frameTable.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFunctionSettingUp), 700);
+                    //鍙冲浘鏍�
+                    rowFunction.frameTable.AddRightArrow();
+                    //搴曠嚎
+                    rowFunction.frameTable.AddBottomLine();
+                    rowFunction.frameTable.ButtonClickEvent += (sender, e) =>
+                    {
+                        var form = new DeviceLight.MiniNightLightFunctionSettionForm();
+                        form.AddForm(miniDevice);
+                    };
+                }
+            }
 
             //鏁版嵁涓婁紶涓庝笅杞�
             var rowData = new RowLayoutControl(listview.rowSpace / 2);
@@ -156,7 +202,7 @@
             };
 
             //鍒濆鍖栨甯冨畬鎴�
-            tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+            tableContr.FinishInitControl();
             tableContr = null;
 
             //淇濆瓨
@@ -390,7 +436,7 @@
                 else
                 {
                     //鍒锋柊涓荤敾闈�(涓嶉噸鏂拌幏鍙栬澶囩姸鎬�)
-                    this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame", false);
+                    this.LoadFormMethodByName("DeviceListMainForm", "InitMiddleFrame");
                 }
             });
         }

--
Gitblit v1.8.0