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/GatewayProductInfoForm.cs | 34 +++++++++++++++++++++++++++------- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs index 1ce3a11..d19b1ff 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 imageFile = "Gateway/RealGateway" + this.zbGateway.getGwInfo.LinuxImageType + ".png"; + string fullName = IO.FileUtils.GetImageFilePath(imageFile); + if (fullName == string.Empty) + { + //濡傛灉娌℃湁鎸囧畾鐨勭綉鍏崇殑鐪熷疄鍥剧墖鐨勮瘽,鍒欑敤鍏遍�氬浘鐗� + imageFile = "Gateway/RealGateway.png"; + + } +#if Android + //璁惧鍥剧墖 + var bim = Android.Graphics.BitmapFactory.DecodeFile(fullName); + var btnpictrue = new PicViewControl(bim.Width, bim.Height); +#endif +#if iOS + //璁惧鍥剧墖 + var bim = UIKit.UIImage.FromFile(fullName); + 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,15 +122,14 @@ 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); //瀹夎浣嶇疆 var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2); -- Gitblit v1.8.0