From 5428935270159bfc42c2934ed7fb1091554fc9a4 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 09 七月 2020 17:12:42 +0800
Subject: [PATCH] 修改了 sokect
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs | 67 +++++++++++++++++++++++++--------
1 files changed, 50 insertions(+), 17 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
index 5609b22..cc6932b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
@@ -160,27 +160,60 @@
return;
}
this.sensorPushing = true;
- //璁惧
- uint oldTextColor1 = btnDeviceName.TextColor;
- btnDeviceName.TextColor = UserCenterColor.Current.TextOrangeColor;
- //璁惧鎴块棿
- uint oldTextColor2 = btnDeviceRoom.TextColor;
- btnDeviceRoom.TextColor = UserCenterColor.Current.TextOrangeColor;
+
HdlThreadLogic.Current.RunThread(() =>
{
- System.Threading.Thread.Sleep(5000);
- HdlThreadLogic.Current.RunMain(() =>
+ //闂儊5绉�,闂撮殧400姣
+ int count = 5000 / 400;
+ bool isOpen = false;
+ while (this.Parent != null && count >= 0)
{
- if (btnDeviceName.Parent != null)
+ //闂儊鐗规晥
+ HdlThreadLogic.Current.RunMain(() =>
{
- //璁惧
- btnDeviceName.TextColor = oldTextColor1;
- //璁惧鎴块棿
- btnDeviceRoom.TextColor = oldTextColor2;
- }
- this.sensorPushing = false;
- }, ShowErrorMode.NO);
- });
+ isOpen = !isOpen;
+ this.SwitchRowStatuAppeal(isOpen);
+ }, ShowErrorMode.NO);
+ System.Threading.Thread.Sleep(400);
+ count--;
+ }
+ if (this.Parent != null && isOpen == true)
+ {
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //缁撴潫鏃�,榛樿涓烘棤鐗规晥
+ this.SwitchRowStatuAppeal(false);
+ }, ShowErrorMode.NO);
+ }
+ this.sensorPushing = false;
+
+ }, ShowErrorMode.NO);
+ }
+
+ /// <summary>
+ /// 鍒囨崲琛岄棯鐑佺壒鏁�
+ /// </summary>
+ /// <param name="isOpen"></param>
+ private void SwitchRowStatuAppeal(bool isOpen)
+ {
+ if (isOpen == true)
+ {
+ //鍥炬爣
+ btnIcon.IsSelected = true;
+ //璁惧
+ btnDeviceName.TextColor = UserCenterColor.Current.TextOrangeColor;
+ //璁惧鎴块棿
+ btnDeviceRoom.TextColor = UserCenterColor.Current.TextOrangeColor;
+ }
+ else
+ {
+ //鍥炬爣
+ btnIcon.IsSelected = false;
+ //璁惧
+ btnDeviceName.TextColor = UserCenterColor.Current.TextColor1;
+ //璁惧鎴块棿
+ btnDeviceRoom.TextColor = UserCenterColor.Current.TextGrayColor1;
+ }
}
#endregion
--
Gitblit v1.8.0