From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期三, 22 六月 2022 11:22:18 +0800
Subject: [PATCH] 修改引用路径
---
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs | 42 ++++++++++++++++++++++++++++++++----------
1 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs
index 1ce3a11..70dd808 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();
@@ -73,6 +94,7 @@
if (gateWayExist == true)
{
btnGateName = new FrameCaptionInputControl(caption, deviceName, listview.rowSpace / 2);
+ btnGateName.txtInput.MaxByte = 32;//闄愬埗鍙兘杈撳叆32涓瓧鑺�
listview.AddChidren(btnGateName);
btnGateName.InitControl();
//鍒掔嚎
@@ -101,15 +123,15 @@
btnNote.AddBottomLine();
}
- //璁惧绫诲瀷
+ //璁惧绫诲瀷 (鍥哄畾鏅鸿兘缃戝叧)
caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
- var btnType = new FrameCaptionViewControl(caption, string.Empty, listview.rowSpace / 2);
+ var infoContent = Common.LocalDevice.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();
//鍒掔嚎
btnType.AddBottomLine();
- HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, zbGateway);
//瀹夎浣嶇疆
var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
@@ -120,7 +142,7 @@
rowBeloneArea.SelectRoomEvent += (roomKeys) =>
{
//鍙樻洿缃戝叧鎴块棿
- HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys);
+ HdlRoomLogic.Current.ChangedGatewayRoom(this.zbGateway.GwId, roomKeys);
};
//瀹屾垚鍒濆鍖栨甯�
@@ -200,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();
--
Gitblit v1.8.0