| | |
| | | public IconControlCommon()
|
| | | {
|
| | | //这个事件是搞点亮特效的
|
| | | this.MouseDownEventHandler += this.Button_MouseDownEvent;
|
| | | this.ButtonDownClickEvent += this.Button_MouseDownEvent;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | 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)
|
| | |
| | | //设置处于选择状态时,显示的图标
|
| | | this.SetSelectPictrue();
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | System.Threading.Thread.Sleep(ControlCommonResourse.StatuChangedWaitTime);
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | //设置处于非选择状态时,显示的图标
|
| | | this.SetUnSelectPictrue();
|
| | | });
|
| | | });
|
| | | //设置处于非选择状态时,显示的图标
|
| | | this.SetUnSelectPictrue(true);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | /// <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
|
| | | }
|