From f14dcfd967404e197e7ec995ca8d6f2b090d3b7d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 11 九月 2020 09:16:59 +0800
Subject: [PATCH] 优化多功能面板:绑定温湿度传感器目标,和设备列表回路显示。优化数据矫正功能温湿度度不设置的情况。优化门锁时间设置最后一天和最后最后一个月的时间显示等 细节
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs | 52 +++++++++++++++++++++++++++++++---------------------
1 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
index c3a0bc0..2091089 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
@@ -43,7 +43,7 @@
/// <summary>
/// 鏄剧ずIP鎺т欢
/// </summary>
- private NormalViewControl btnIp = null;
+ public NormalViewControl btnIp = null;
/// <summary>
/// 鍦ㄧ嚎鐘舵��
@@ -57,9 +57,12 @@
get { return m_IsOnline; }
set
{
- m_IsOnline = value;
- //鍙樻洿鐘舵��
- this.SetOnlineStatu(m_IsOnline);
+ if (m_IsOnline != value)
+ {
+ m_IsOnline = value;
+ //鍙樻洿鐘舵��
+ this.SetOnlineStatu(m_IsOnline);
+ }
}
}
@@ -71,10 +74,10 @@
/// 鍋氭垚涓�涓樉绀虹綉鍏充俊鎭殑RowLayout,娣诲姞姝ゆ帶浠跺埌瀹瑰櫒鍚庯紝璋冪敤銆怚nitControl()銆戝畬鎴愬垵濮嬪寲
/// </summary>
/// <param name="i_zbGateway">缃戝叧瀵硅薄</param>
- /// <param name="ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+ /// <param name="ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
public GatewayRowControl(ZbGateway i_zbGateway, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
{
- this.zbGatewayId = HdlGatewayLogic.Current.GetGatewayId(i_zbGateway);
+ this.zbGatewayId = i_zbGateway.GwId;
}
/// <summary>
@@ -113,24 +116,31 @@
wayName += "(" + Language.StringByID(R.MyInternationalizationString.uChidrenGateway) + ")";
}
}
+ this.btnName = frameTable.AddTopView(wayName, 700);
- this.btnName = frameTable.AddLeftCaption(wayName, 700, 60);
- btnName.TextSize = 15;
- //杩欎釜鍧愭爣鏈夌偣鐗规畩
- btnName.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
- frameTable.AddChidren(btnName, ChidrenBindMode.BindEventOnly);
-
- //鎴块棿
- string strIp = HdlGatewayLogic.Current.GetGatewayBaseInfoAttribute(tempWay, "IpAddress").ToString();
- this.btnIp = frameTable.AddLeftCaption(strIp, 600, 50, true);
- //杩欎釜鍧愭爣鏈夌偣鐗规畩
- btnIp.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
- btnIp.TextSize = 12;
- btnIp.TextColor = UserCenterColor.Current.TextGrayColor1;
- frameTable.AddChidren(btnIp, ChidrenBindMode.BindEventOnly);
+ //IP
+ this.btnIp = frameTable.AddBottomView(tempWay != null ? tempWay.GwIP : string.Empty, 600);
//鍒濆鍊煎湪绾�
this.IsOnline = true;
+
+ if (tempWay != null)
+ {
+ //鍒锋柊缃戝叧淇℃伅
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ var result = HdlGatewayLogic.Current.GetGatewayInfo(tempWay, false, ShowErrorMode.NO);
+ if (result != null)
+ {
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //鍒锋柊鎺т欢
+ tempWay.GatewayOnlineFlage = true;
+ this.RefreshControl(tempWay);
+ });
+ }
+ });
+ }
}
#endregion
@@ -145,7 +155,7 @@
{
if (zbway != null)
{
- this.zbGatewayId = HdlGatewayLogic.Current.GetGatewayId(zbway);
+ this.zbGatewayId = zbway.GwId;
}
bool bonline = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway);
--
Gitblit v1.8.0