From 7066c7866a6e6faef9c1cbc0793cecf392454baa Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 05 一月 2021 17:50:15 +0800
Subject: [PATCH] 20201-1-5-1
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs | 216 +++++++++++++++++++++++++++---------------------------
1 files changed, 108 insertions(+), 108 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs
old mode 100755
new mode 100644
index 1b53982..5ff8412
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Common/ClickButtonCommon.cs
@@ -1,113 +1,113 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Shared.Phone.UserCenter
-{
- /// <summary>
- /// 鐐瑰嚮鎸夐挳绫荤殑鍏遍��
- /// </summary>
- public class ClickButtonCommon : ButtonBase
- {
- #region 鈻� 鍙橀噺澹版槑___________________________
-
- /// <summary>
- /// 鏄惁鍚敤鐐逛寒鍔熻兘(榛樿鍚敤)
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+ /// <summary>
+ /// 鐐瑰嚮鎸夐挳绫荤殑鍏遍��
+ /// </summary>
+ public class ClickButtonCommon : ButtonBase
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 鏄惁鍚敤鐐逛寒鍔熻兘(榛樿鍚敤)
/// </summary>
- public bool UseClickStatu = true;
- /// <summary>
- /// 鍘熸潵鐨勮儗鏅壊(杩笉寰楀繁,杩欎釜涓滆タ闇�瑕佸紑鏀惧嚭鍘�,璁剧疆涓�娆′箣鍚庡皢涓嶄細鍐嶈缃�)
+ public bool UseClickStatu = true;
+ /// <summary>
+ /// 鍘熸潵鐨勮儗鏅壊(杩笉寰楀繁,杩欎釜涓滆タ闇�瑕佸紑鏀惧嚭鍘�,璁剧疆涓�娆′箣鍚庡皢涓嶄細鍐嶈缃�)
/// </summary>
- public uint oldBackgroundColor = 0;
- /// <summary>
- /// 鐐瑰嚮鐘舵�佺殑鑳屾櫙鑹�(杩笉寰楀繁,杩欎釜涓滆タ闇�瑕佸紑鏀惧嚭鍘�,榛樿浣跨敤搴曞眰璁剧疆鐨�)
- /// </summary>
- public uint clickStatuColor = UserCenterColor.Current.ButtonClickStatuColor;
- /// <summary>
- /// 鏄惁澶勪簬閫夋嫨鐘舵��
- /// </summary>
- private bool isSelcetStatu = false;
-
- #endregion
-
- #region 鈻� 鍒濆鍖朹____________________________
-
- /// <summary>
- /// 鍗曞嚮鎸夐挳绫荤殑鍏遍��(鍒濆鍊硷細鎷ユ湁鐐逛寒鍔熻兘锛岀櫧鑹插瓧浣擄紝榛戣壊鑳屾櫙锛屾枃瀛楀眳涓�)
- /// </summary>
- public ClickButtonCommon()
- {
+ public uint oldBackgroundColor = 0;
+ /// <summary>
+ /// 鐐瑰嚮鐘舵�佺殑鑳屾櫙鑹�(杩笉寰楀繁,杩欎釜涓滆タ闇�瑕佸紑鏀惧嚭鍘�,榛樿浣跨敤搴曞眰璁剧疆鐨�)
+ /// </summary>
+ public uint clickStatuColor = UserCenterColor.Current.ButtonClickStatuColor;
+ /// <summary>
+ /// 鏄惁澶勪簬閫夋嫨鐘舵��
+ /// </summary>
+ private bool isSelcetStatu = false;
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 鍗曞嚮鎸夐挳绫荤殑鍏遍��(鍒濆鍊硷細鎷ユ湁鐐逛寒鍔熻兘锛岀櫧鑹插瓧浣擄紝榛戣壊鑳屾櫙锛屾枃瀛楀眳涓�)
+ /// </summary>
+ public ClickButtonCommon()
+ {
this.TextColor = UserCenterColor.Current.White;
this.BackgroundColor = UserCenterColor.Current.ClickButtonDefultColor;
- this.TextAlignment = TextAlignment.Center;
-
- this.ButtonDownClickEvent += this.Button_MouseDownEvent;
- }
-
- #endregion
-
- #region 鈻� 鎺т欢鐐逛寒鐗规晥_______________________
-
- /// <summary>
- /// 鍗曞嚮鎸変笅浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
+ this.TextAlignment = TextAlignment.Center;
+
+ this.ButtonDownClickEvent += this.Button_MouseDownEvent;
+ }
+
+ #endregion
+
+ #region 鈻� 鎺т欢鐐逛寒鐗规晥_______________________
+
+ /// <summary>
+ /// 鍗曞嚮鎸変笅浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
/// <param name="e"></param>
- private void Button_MouseDownEvent(object sender, MouseEventArgs e)
- {
- if (this.UseClickStatu == false)
- {
- //姘镐箙绉婚櫎
- this.ButtonDownClickEvent -= Button_MouseDownEvent;
- return;
- }
- if (base.CanClick == false || isSelcetStatu == true)
- {
- //鎺т欢涓嶈兘鐐瑰嚮,鎴栬�呭綋鍓嶅浜庨�夋嫨鐘舵��,鍒欎笉鑳借Е鍙�
- return;
- }
- if (this.oldBackgroundColor == 0)
- {
- this.oldBackgroundColor = this.BackgroundColor;
- }
- //璁剧疆鐐瑰嚮鍚庣殑鐘舵��
- this.SetClickStatu();
-
- HdlThreadLogic.Current.RunThread(() =>
- {
- System.Threading.Thread.Sleep(ControlCommonResourse.StatuChangedWaitTime);
- Application.RunOnMainThread(() =>
- {
- if (base.CanClick == false || isSelcetStatu == false)
- {
- //鎺т欢涓嶈兘鐐瑰嚮,鎴栬�呭綋鍓嶅浜庨潪閫夋嫨鐘舵��,鍒欎笉鑳借Е鍙�
- return;
- }
- //璁剧疆闈炵偣鍑诲悗鐨勭姸鎬�
- this.SetNotClickStatu();
- });
- });
- }
-
- /// <summary>
- /// 璁剧疆鐐瑰嚮鍚庣殑鐘舵��
- /// </summary>
- public override void SetClickStatu()
- {
- this.isSelcetStatu = true;
- this.BackgroundColor = clickStatuColor;
- }
-
- /// <summary>
- /// 璁剧疆闈炵偣鍑诲悗鐨勭姸鎬�
- /// </summary>
- public override void SetNotClickStatu()
- {
- this.isSelcetStatu = false;
- //璁剧疆涓嶉�夋嫨鐘舵��
- this.BackgroundColor = oldBackgroundColor;
- }
-
- #endregion
- }
-}
+ private void Button_MouseDownEvent(object sender, MouseEventArgs e)
+ {
+ if (this.UseClickStatu == false)
+ {
+ //姘镐箙绉婚櫎
+ this.ButtonDownClickEvent -= Button_MouseDownEvent;
+ return;
+ }
+ if (base.CanClick == false || isSelcetStatu == true)
+ {
+ //鎺т欢涓嶈兘鐐瑰嚮,鎴栬�呭綋鍓嶅浜庨�夋嫨鐘舵��,鍒欎笉鑳借Е鍙�
+ return;
+ }
+ if (this.oldBackgroundColor == 0)
+ {
+ this.oldBackgroundColor = this.BackgroundColor;
+ }
+ //璁剧疆鐐瑰嚮鍚庣殑鐘舵��
+ this.SetClickStatu();
+
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ System.Threading.Thread.Sleep(ControlCommonResourse.StatuChangedWaitTime);
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ if (base.CanClick == false || isSelcetStatu == false)
+ {
+ //鎺т欢涓嶈兘鐐瑰嚮,鎴栬�呭綋鍓嶅浜庨潪閫夋嫨鐘舵��,鍒欎笉鑳借Е鍙�
+ return;
+ }
+ //璁剧疆闈炵偣鍑诲悗鐨勭姸鎬�
+ this.SetNotClickStatu();
+ });
+ });
+ }
+
+ /// <summary>
+ /// 璁剧疆鐐瑰嚮鍚庣殑鐘舵��
+ /// </summary>
+ public override void SetClickStatu()
+ {
+ this.isSelcetStatu = true;
+ this.BackgroundColor = clickStatuColor;
+ }
+
+ /// <summary>
+ /// 璁剧疆闈炵偣鍑诲悗鐨勭姸鎬�
+ /// </summary>
+ public override void SetNotClickStatu()
+ {
+ this.isSelcetStatu = false;
+ //璁剧疆涓嶉�夋嫨鐘舵��
+ this.BackgroundColor = oldBackgroundColor;
+ }
+
+ #endregion
+ }
+}
--
Gitblit v1.8.0