From 9acd3887f1f8db40d59f991b1726a61aa7c7637c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 12 五月 2021 15:13:56 +0800 Subject: [PATCH] Merge branch 'CJL' into wxr4 --- 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