From 9c16d3614d9b88c637f967518a329f239fcd3aaf Mon Sep 17 00:00:00 2001
From: lss <316519258@qq.com>
Date: 星期五, 12 六月 2020 09:22:04 +0800
Subject: [PATCH] 2020.06.12

---
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs |   53 ++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 38 insertions(+), 15 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs
index e142e5b..b509b41 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs
@@ -56,11 +56,32 @@
             framePic.Gravity = Gravity.CenterHorizontal;
             framePic.Y = Application.GetRealHeight(58);
             listBackControl.frameTable.AddChidren(framePic);
+
+            var linuxImageType = this.zbGateway.LinuxImageType.ToString();
+            var imageFile = "Gateway/RealGateway" + linuxImageType + ".png";
+            imageFile = IO.FileUtils.GetImageFilePath(imageFile);
+            if (imageFile == string.Empty)
+            {
+                //濡傛灉娌℃湁鎸囧畾鐨勭綉鍏崇殑鐪熷疄鍥剧墖鐨勮瘽,鍒欑敤鍏遍�氬浘鐗�
+                imageFile = IO.FileUtils.GetImageFilePath("Gateway/RealGateway.png");
+            }
+#if Android
+            //璁惧鍥剧墖
+            var bim = Android.Graphics.BitmapFactory.DecodeFile(imageFile);
+            var btnpictrue = new PicViewControl(bim.Width, bim.Height);
+#endif
+#if iOS
+            //璁惧鍥剧墖
+            var bim = UIKit.UIImage.FromFile(imageFile);
+            var btnpictrue = new PicViewControl((int)bim.Size.Width, (int)bim.Size.Height);
+#endif
+            bim.Dispose();
+            bim = null;
+
             //鍥剧墖
-            var btnImage = new PicViewControl(380, 328, true);
-            btnImage.Gravity = Gravity.Center;
-            btnImage.UnSelectedImagePath = "Gateway/RealGateway.png";
-            framePic.AddChidren(btnImage);
+            btnpictrue.Gravity = Gravity.Center;
+            btnpictrue.UnSelectedImagePath = imageFile;
+            framePic.AddChidren(btnpictrue);
 
             //鍒濆鍖栨甯�
             var tableContr = new InformationEditorControl();
@@ -101,24 +122,26 @@
                 btnNote.AddBottomLine();
             }
 
-            //璁惧绫诲瀷
+            //璁惧绫诲瀷 (鍥哄畾鏅鸿兘缃戝叧)
             caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
-            var btnType = new FrameCaptionViewControl(caption, string.Empty, listview.rowSpace / 2);
+            var btnType = new FrameCaptionViewControl(caption, Language.StringByID(60004), listview.rowSpace / 2);
             btnType.UseClickStatu = false;
             listview.AddChidren(btnType);
             btnType.InitControl();
             //鍒掔嚎
             btnType.AddBottomLine();
-            HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, zbGateway);
 
-            //鎵�灞炰綇瀹�
-            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();
+            //瀹夎浣嶇疆
+            var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
+            listview.AddChidren(rowBeloneArea);
+            rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uInstallationLocation), this.zbGateway);
+            //搴曠嚎
+            rowBeloneArea.AddBottomLine();
+            rowBeloneArea.SelectRoomEvent += (roomKeys) =>
+            {
+                //鍙樻洿缃戝叧鎴块棿
+                HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys);
+            };
 
             //瀹屾垚鍒濆鍖栨甯�
             tableContr.FinishInitControl();

--
Gitblit v1.8.0