From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs index d19b1ff..0fe5eaa 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs @@ -57,22 +57,22 @@ 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) + var linuxImageType = this.zbGateway.LinuxImageType.ToString(); + var imageFile = "Gateway/RealGateway" + linuxImageType + ".png"; + imageFile = IO.FileUtils.GetImageFilePath(imageFile); + if (imageFile == string.Empty) { //濡傛灉娌℃湁鎸囧畾鐨勭綉鍏崇殑鐪熷疄鍥剧墖鐨勮瘽,鍒欑敤鍏遍�氬浘鐗� - imageFile = "Gateway/RealGateway.png"; - + imageFile = IO.FileUtils.GetImageFilePath("Gateway/RealGateway.png"); } #if Android //璁惧鍥剧墖 - var bim = Android.Graphics.BitmapFactory.DecodeFile(fullName); + var bim = Android.Graphics.BitmapFactory.DecodeFile(imageFile); var btnpictrue = new PicViewControl(bim.Width, bim.Height); #endif #if iOS //璁惧鍥剧墖 - var bim = UIKit.UIImage.FromFile(fullName); + var bim = UIKit.UIImage.FromFile(imageFile); var btnpictrue = new PicViewControl((int)bim.Size.Width, (int)bim.Size.Height); #endif bim.Dispose(); @@ -94,6 +94,7 @@ if (gateWayExist == true) { btnGateName = new FrameCaptionInputControl(caption, deviceName, listview.rowSpace / 2); + btnGateName.txtInput.MaxByte = 32;//闄愬埗鍙兘杈撳叆32涓瓧鑺� listview.AddChidren(btnGateName); btnGateName.InitControl(); //鍒掔嚎 @@ -124,7 +125,8 @@ //璁惧绫诲瀷 (鍥哄畾鏅鸿兘缃戝叧) caption = Language.StringByID(R.MyInternationalizationString.uDeviceType); - var btnType = new FrameCaptionViewControl(caption, Language.StringByID(60004), listview.rowSpace / 2); + var infoContent = HdlDeviceCommonLogic.Current.GetDeviceModelIdNameInfo("1"); + var btnType = new FrameCaptionViewControl(caption, infoContent != null ? infoContent.A绫诲瀷鍚嶅瓧 : string.Empty, listview.rowSpace / 2); btnType.UseClickStatu = false; listview.AddChidren(btnType); btnType.InitControl(); @@ -140,7 +142,7 @@ rowBeloneArea.SelectRoomEvent += (roomKeys) => { //鍙樻洿缃戝叧鎴块棿 - HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys); + HdlRoomLogic.Current.ChangedGatewayRoom(this.zbGateway.GwId, roomKeys); }; //瀹屾垚鍒濆鍖栨甯� @@ -158,12 +160,12 @@ btnHelp.ButtonClickEvent += (sender, e) => { var form = new GatewayManage.GatewayInfoEditorForm(); - this.AddFromAndRemoveNowForm(form, zbGateway); + this.AddFormAndCloseNowForm(form, zbGateway); }; listBackControl.frameTable.AddChidren(btnHelp); //搴曠嚎 int lineWidth = btnHelp.GetRealWidthByText(); - var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false); + var btnLine = new NormalViewControl(lineWidth, HdlControlResourse.BottomLineHeight, false); btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; btnLine.Gravity = Gravity.CenterHorizontal; btnLine.Y = btnHelp.Bottom - Application.GetRealHeight(8); @@ -220,12 +222,12 @@ /// </summary> /// <param name="gatewayName">缃戝叧鍚嶇О</param> /// <param name="closeForm">鍏抽棴鐣岄潰</param> - private async void SetGatewayName(string gatewayName, bool closeForm) + private void SetGatewayName(string gatewayName, bool closeForm) { //鎵撳紑杩涘害鏉� this.ShowProgressBar(); //淇敼鏈湴缃戝叧鍚� - var result = await HdlGatewayLogic.Current.ReName(zbGateway, gatewayName); + var result = HdlGatewayLogic.Current.ReName(zbGateway, gatewayName); //鍏抽棴杩涘害鏉� this.CloseProgressBar(); @@ -241,7 +243,7 @@ //鍏抽棴鑷韩 this.CloseForm(); //鏄惁鏄富椤垫坊鍔� - if (UserCenterResourse.DicActionForm.ContainsKey("GatewayListForm") == false) + if (HdlFormLogic.Current.IsFormOpen("GatewayListForm") == false) { var form = new GatewayAddSuccessForm(); form.AddForm(); -- Gitblit v1.8.0