From e6692890b94c885a98f090848d6ebdff72328632 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 12 五月 2020 11:05:31 +0800
Subject: [PATCH] 2020-5-12-1
---
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs | 44 +++++++++++++++++++++++++++++++++-----------
1 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
index 7989f1a..6739b3e 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);
//璁惧澶囨敞
@@ -84,15 +88,35 @@
}
};
- //璁惧绫诲瀷
+ //璁惧绫诲瀷 (鍥哄畾鏅鸿兘缃戝叧)
caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
- var btnType = new FrameCaptionViewControl(caption, nameValue, listview.rowSpace / 2);
+ var btnType = new FrameCaptionViewControl(caption, Language.StringByID(60004), listview.rowSpace / 2);
btnType.UseClickStatu = false;
listview.AddChidren(btnType);
btnType.InitControl();
- HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, this.zbGateway);
//鍒掔嚎
btnType.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);
+ };
+
+ //鎵�灞炰綇瀹�
+ 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 rowData = new RowLayoutControl(listview.rowSpace / 2);
@@ -145,7 +169,7 @@
};
//鍒濆鍖栨甯冨畬鎴�
- tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+ tableContr.FinishInitControl();
tableContr = null;
//淇濆瓨
@@ -174,7 +198,7 @@
HdlThreadLogic.Current.RunThread(() =>
{
//妫�娴嬫柊鐗堟湰
- this.CheckNewVersion(btnNewVersion, btnType);
+ this.CheckNewVersion(btnNewVersion);
});
}
@@ -268,8 +292,7 @@
/// 妫�娴嬫柊鐗堟湰
/// </summary>
/// <param name="btnNewVersion">鎻愮ず鏈夋柊鐗堟湰鐨勬帶浠�</param>
- /// <param name="btnType">缃戝叧绫诲瀷鎺т欢</param>
- private async void CheckNewVersion(PicViewControl btnNewVersion, FrameCaptionViewControl btnType)
+ private async void CheckNewVersion(PicViewControl btnNewVersion)
{
//鑾峰彇缃戝叧鐗堟湰淇℃伅
var result = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
@@ -281,7 +304,6 @@
{
if (this.Parent != null)
{
- HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, this.zbGateway);
if (result[0] != null || result[1] != null || result[2] != null)
{
//鎻愮ず鏈夋柊鐗堟湰
--
Gitblit v1.8.0