From da3634e011bbda29cf4e1c168997b780fe795b20 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 13 五月 2020 09:05:23 +0800
Subject: [PATCH] 优化新风模块和新风面板的测试功能,请合并代码
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs | 41 ++++++++++++++++++++++++++---------------
1 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs
index cebfbe2..f93af7e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs
@@ -26,7 +26,7 @@
public IconControlCommon()
{
//杩欎釜浜嬩欢鏄悶鐐逛寒鐗规晥鐨�
- this.MouseDownEventHandler += this.Button_MouseDownEvent;
+ this.ButtonDownClickEvent += this.Button_MouseDownEvent;
}
#endregion
@@ -43,7 +43,7 @@
if (this.UseClickStatu == false || string.IsNullOrEmpty(this.SelectedImagePath) == true)
{
//姘镐箙绉婚櫎
- this.MouseDownEventHandler -= this.Button_MouseDownEvent;
+ this.ButtonDownClickEvent -= Button_MouseDownEvent;
return;
}
if (base.CanClick == false || this.IsSelected == true)
@@ -54,16 +54,8 @@
//璁剧疆澶勪簬閫夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
this.SetSelectPictrue();
- new System.Threading.Thread(() =>
- {
- System.Threading.Thread.Sleep(ControlCommonResourse.StatuChangedWaitTime);
- Application.RunOnMainThread(() =>
- {
- //璁剧疆澶勪簬闈為�夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
- this.SetUnSelectPictrue();
- });
- })
- { IsBackground = true }.Start();
+ //璁剧疆澶勪簬闈為�夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
+ this.SetUnSelectPictrue(true);
}
/// <summary>
@@ -77,10 +69,29 @@
/// <summary>
/// 璁剧疆澶勪簬闈為�夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
/// </summary>
- public void SetUnSelectPictrue()
+ /// <param name="waitTime">杩藉姞鍙橀噺:鏄惁绛夊緟</param>
+ public void SetUnSelectPictrue(bool waitTime)
{
- //璁剧疆涓嶉�夋嫨鐘舵��
- this.IsSelected = false;
+ if (waitTime == false)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ //璁剧疆涓嶉�夋嫨鐘舵��
+ this.IsSelected = false;
+ });
+ }
+ else
+ {
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ System.Threading.Thread.Sleep(ControlCommonResourse.StatuChangedWaitTime);
+ Application.RunOnMainThread(() =>
+ {
+ //璁剧疆涓嶉�夋嫨鐘舵��
+ this.IsSelected = false;
+ });
+ });
+ }
}
#endregion
}
--
Gitblit v1.8.0