From 9ef48d7b2da7c408b53f73be0f6eef3cbac1c84a Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 19 十一月 2020 10:23:45 +0800 Subject: [PATCH] Evoyo.Home1.1.0120111601_Release --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs | 73 ++++++++++++++++++++++++++---------- 1 files changed, 53 insertions(+), 20 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs index e9c72d8..27f40e9 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs @@ -89,10 +89,10 @@ //璁惧 string deviceName = Common.LocalDevice.Current.GetDeviceMacName(listDevice[0]); btnDeviceName = frameTable.AddTopView(deviceName, 800); - frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEventOnly); + frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent); //鎴块棿 - string roomName = Common.LocalDevice.Current.GeteRealDeviceRoomName(listDevice[0]); + string roomName = HdlRoomLogic.Current.GeteRealDeviceRoomName(listDevice[0]); btnDeviceRoom = frameTable.AddBottomView(roomName, 800); //搴曠嚎 @@ -145,7 +145,7 @@ //璁惧 btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceMacName(listDevice[0]); //璁惧鎴块棿 - btnDeviceRoom.Text = Common.LocalDevice.Current.GeteRealDeviceRoomName(listDevice[0]); + btnDeviceRoom.Text = HdlRoomLogic.Current.GeteRealDeviceRoomName(listDevice[0]); } @@ -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