From c7df85937f73fb347ee0b19e9c052d2d00a6df6c Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 18 九月 2020 13:58:19 +0800
Subject: [PATCH] 新版本
---
ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs | 76 ++++++++++++++++++++++----------------
1 files changed, 44 insertions(+), 32 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs b/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs
index e6cc62c..4c0881f 100755
--- a/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs
+++ b/ZigbeeApp/Shared/Phone/CommonForm/CommonFormBase.cs
@@ -228,38 +228,10 @@
/// <param name="msg">淇℃伅</param>
/// <param name="action">鍗曞嚮纭鍚庢墽琛岀殑鍥炶皟鍑芥暟</param>
/// <param name="buttonText">鎸夐挳鐨勬枃鏈�</param>
- public void ShowMassage(ShowMsgType msgType, string msg, Action action = null, string buttonText = null)
+ /// <param name="i_waitTime">绛夊緟鏃堕棿,鍗曚綅涓虹,璁剧疆纭鎸夐挳鍦ㄥ闀挎椂闂村悗鎵嶈兘澶熺偣鍑�</param>
+ public void ShowMassage(ShowMsgType msgType, string msg, Action action = null, string buttonText = null, int i_waitTime = -1)
{
- //绌哄璞℃椂锛屼笉鏄剧ず
- if (string.IsNullOrEmpty(msg))
- {
- return;
- }
- Application.RunOnMainThread(() =>
- {
- var alert = new ShowMsgControl(msgType, msg, buttonText);
- if (action != null)
- {
- alert.ConfirmClickEvent += () =>
- {
- try
- {
- //鍥炶皟鍑芥暟
- action?.Invoke();
- }
- catch (Exception ex)
- {
- //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
- this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
-
- //Log鍑哄姏
- HdlLogLogic.Current.WriteLog(ex);
- }
- action = null;
- };
- }
- alert.Show();
- });
+ HdlMessageLogic.Current.ShowMassage(msgType, msg, action, buttonText, i_waitTime);
}
/// <summary>
@@ -288,6 +260,46 @@
return HdlControlLogic.Current.GetPictrueRealSize(i_size);
}
+ /// <summary>
+ /// 璁$畻鐪熷疄瀹藉害(鍙兘浠ュ悗浼氬彉鍔�,鎵�浠ュ0鏄庡嚭鏉ユ湁鐢ㄥ)
+ /// </summary>
+ /// <param name="i_size"></param>
+ /// <returns></returns>
+ public int GetRealWidth(int i_size)
+ {
+ return HdlControlLogic.Current.GetRealWidth(i_size);
+ }
+
+ /// <summary>
+ /// 璁$畻鐪熷疄楂樺害搴�(鍙兘浠ュ悗浼氬彉鍔�,鎵�浠ュ0鏄庡嚭鏉ユ湁鐢ㄥ)
+ /// </summary>
+ /// <param name="i_size"></param>
+ /// <returns></returns>
+ public int GetRealHeight(int i_size)
+ {
+ return HdlControlLogic.Current.GetRealHeight(i_size);
+ }
+
+ /// <summary>
+ /// 璁$畻鐪熷疄澶у皬(杩欎釜涓滆タ鏈夌壒娈婄敤澶�,鑰冭檻鍒板姞闀垮瀷灞忓箷鐨勬帶浠�,璋冪敤姝ゆ柟娉�)
+ /// </summary>
+ /// <param name="i_size"></param>
+ /// <returns></returns>
+ public int GetRealSizeEx(int i_size)
+ {
+ return HdlControlLogic.Current.GetRealSizeEx(i_size);
+ }
+
+ /// <summary>
+ /// 鍒ゆ柇鎸囧畾鐨勭晫闈㈡槸鍚︽墦寮�
+ /// </summary>
+ /// <param name="formId"></param>
+ /// <returns></returns>
+ public bool IsFormOpen(string formId)
+ {
+ return UserCenterResourse.DicActionForm.ContainsKey(formId);
+ }
+
#endregion
#region 鈻� 妫�娴嬮敊璇痏__________________________
@@ -296,7 +308,7 @@
/// 妫�娴嬬晫闈㈢殑閿欒
/// </summary>
/// <returns></returns>
- public bool CheckForm()
+ public virtual bool CheckForm()
{
//妫�娴嬫帶浠�
return this.CheckControl(this);
--
Gitblit v1.8.0