From 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 02 一月 2020 19:51:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into DEV_GXC

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/IconControlCommon.cs |   40 ++++++++++++++++++++++++++--------------
 1 files changed, 26 insertions(+), 14 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 64a0020..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,15 +54,8 @@
             //璁剧疆澶勪簬閫夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
             this.SetSelectPictrue();
 
-            HdlThreadLogic.Current.RunThread(() =>
-            {
-                System.Threading.Thread.Sleep(ControlCommonResourse.StatuChangedWaitTime);
-                Application.RunOnMainThread(() =>
-                {
-                    //璁剧疆澶勪簬闈為�夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
-                    this.SetUnSelectPictrue();
-                });
-            });
+            //璁剧疆澶勪簬闈為�夋嫨鐘舵�佹椂,鏄剧ず鐨勫浘鏍�
+            this.SetUnSelectPictrue(true);
         }
 
         /// <summary>
@@ -76,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