From 802f200c004348defca5cefd047ad843c74abadd Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 01 四月 2021 09:21:42 +0800
Subject: [PATCH] Merge branch 'temp-wxr' into WJC

---
 HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs b/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
index 814f7d7..06422ea 100644
--- a/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
+++ b/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
@@ -215,6 +215,24 @@
             return Application.GetRealWidth(i_size);
         }
 
+        /// <summary>
+        /// 鑾峰彇鍥剧墖閲岄潰,瀛愭帶浠舵枃鏈殑楂樺害
+        /// </summary>
+        /// <param name="i_height">楂樺害</param>
+        /// <returns></returns>
+        public int GetPicChidrenTextHeight(int i_height)
+        {
+            int value1 = Application.GetRealHeight(i_height);
+            int value2 = Application.GetRealWidth(i_height);
+            //褰撳搴︽瘮鐜囧ぇ浜庨珮搴︽椂锛岀敤瀹藉害
+            if (value2 > value1)
+            {
+                return value2;
+            }
+            //鍚﹀垯,鑰冭檻鍒版樉绀哄畬鍏ㄧ殑闂,闇�瑕佷娇鐢ㄩ珮搴︽瘮鐜�
+            return value1;
+        }
+
         #endregion
 
         #region 鈻� 鍙嶅皠鏂规硶___________________________
@@ -274,9 +292,11 @@
                 return myMethod.Invoke(form, parameter);
             }
             catch (Exception ex)
-            {
-                //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
-                HdlMessageLogic.Current.ShowAppProgramIsError(ex);
+            {
+#if DEBUG
+                //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+                HdlMessageLogic.Current.ShowAppProgramIsError(ex);
+#endif
                 return null;
             }
         }

--
Gitblit v1.8.0