From 652243206427f35a256400a149a1734085824cb9 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 02 九月 2020 17:35:03 +0800
Subject: [PATCH] 2020-09-02-4
---
ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs | 70 ++++++++++++++++++++++++++++++++++-
1 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs b/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs
index 5c002e7..3089a89 100755
--- a/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs
+++ b/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs
@@ -143,7 +143,8 @@
/// </summary>
/// <param name="gateWay">缃戝叧瀵硅薄</param>
/// <param name="online">鍦ㄧ嚎鐘舵�佸彉鏇村悗鐨勭姸鎬�</param>
- public virtual void GatewayOnlinePush(ZigBee.Device.ZbGateway gateWay, bool online)
+ /// <param name="hadGwOnline">2020.05.25杩藉姞:姝や綇瀹呮槸鍚︽嫢鏈夌綉鍏冲湪绾�</param>
+ public virtual void GatewayOnlinePush(ZigBee.Device.ZbGateway gateWay, bool online, bool hadGwOnline)
{
}
@@ -234,7 +235,7 @@
{
return;
}
- Application.RunOnMainThread(() =>
+ HdlThreadLogic.Current.RunMain(() =>
{
var alert = new ShowMsgControl(msgType, msg, buttonText);
if (action != null)
@@ -287,8 +288,73 @@
return HdlControlLogic.Current.GetPictrueRealSize(i_size);
}
+ /// <summary>
+ /// 鍒ゆ柇鎸囧畾鐨勭晫闈㈡槸鍚︽墦寮�
+ /// </summary>
+ /// <param name="formId"></param>
+ /// <returns></returns>
+ public bool IsFormOpen(string formId)
+ {
+ return UserCenterResourse.DicActionForm.ContainsKey(formId);
+ }
+
#endregion
+ #region 鈻� 妫�娴嬮敊璇痏__________________________
+
+ /// <summary>
+ /// 妫�娴嬬晫闈㈢殑閿欒
+ /// </summary>
+ /// <returns></returns>
+ public virtual bool CheckForm()
+ {
+ //妫�娴嬫帶浠�
+ return this.CheckControl(this);
+ }
+
+ /// <summary>
+ /// 妫�娴嬫帶浠�
+ /// </summary>
+ /// <param name="view"></param>
+ /// <returns></returns>
+ private bool CheckControl(View view)
+ {
+ //绗竴涓繘鏉ヨ偗瀹氭槸 ViewGroup
+ if (view is ViewGroup)
+ {
+ var viewGroup = (ViewGroup)view;
+ for (int i = 0; i < viewGroup.ChildrenCount; i++)
+ {
+ var myView = viewGroup.GetChildren(i);
+ if (myView is ViewGroup)
+ {
+ //閫掑綊妫�娴�
+ bool result = this.CheckControl(myView);
+ if (result == false)
+ {
+ return false;
+ }
+ continue;
+ }
+ if (myView is TextInputControl)
+ {
+ //妫�娴嬭緭鍏ユ鐨勯敊璇�
+ var error = ((TextInputControl)myView).CheckError();
+ if (error != null)
+ {
+ this.ShowMassage(ShowMsgType.Tip, error);
+ ((TextInputControl)myView).OnError = true;
+ return false;
+ }
+ ((TextInputControl)myView).OnError = false;
+ }
+ }
+ }
+ return true;
+ }
+
+ #endregion
+
#region 鈻� 鍙嶅皠鏂规硶___________________________
/// <summary>
--
Gitblit v1.8.0