From 2ec9898778d3beda89278e2a53ac0e68b3035d29 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 01 七月 2020 15:06:24 +0800
Subject: [PATCH] 2020-7-1-2

---
 ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs |   78 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 77 insertions(+), 1 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs b/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs
index 6a909a9..c24d305 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)
         {
         }
 
@@ -277,8 +278,83 @@
         {
         }
 
+        /// <summary>
+        /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害
+        /// </summary>
+        /// <param name="i_size"></param>
+        /// <returns></returns>
+        public int GetPictrueRealSize(int i_size)
+        {
+            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 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