gxc
2020-01-02 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9
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
    }