From 2ae36ddb40d28c62b64a2fdd4c3033e7d65d5cfb Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期四, 04 三月 2021 15:20:29 +0800 Subject: [PATCH] 2021-0304-1 --- HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs | 47 ++++++++++++++--------------------------------- 1 files changed, 14 insertions(+), 33 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs index 6454ccb..3255433 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs @@ -64,8 +64,6 @@ //鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹� this.InitFrameWhiteContent1(); - //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� - this.RefreshNowDeviceStatuMemory(this.device); //鍒锋柊鐣岄潰鐘舵�� this.RefreshFormStatu(); //璇诲彇鐘舵�� @@ -366,8 +364,6 @@ //涓嶆槸鍚屼竴涓笢瑗� if (this.device.sid != i_LocalDevice.sid) { return; } - //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� - this.RefreshNowDeviceStatuMemory(i_LocalDevice); //鍒锋柊鐣岄潰鐘舵�� this.RefreshFormStatu(); } @@ -389,46 +385,43 @@ { btnIcon.IsSelected = true; #region 鐐逛寒鏂囨湰 - var hotDryTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.HotDry); + var hotDryTemp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.HotDry); if (hotDryTemp != null) { - hotDryView.SetViewStatus(hotDryTemp.value == "true"); + hotDryView.SetViewStatus(hotDryTemp.state == "true"); } - var windDryTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.WindDry); + var windDryTemp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.WindDry); if (windDryTemp != null) { - windDryView.SetViewStatus(windDryTemp.value == "true"); + windDryView.SetViewStatus(windDryTemp.state == "true"); } - var disinfectTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.Disinfect); + var disinfectTemp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.Disinfect); if (disinfectTemp != null) { - disinfectView.SetViewStatus(disinfectTemp.value == "true"); + disinfectView.SetViewStatus(disinfectTemp.state == "true"); } - var lightTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.OnOff); + var lightTemp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.OnOff); if (lightTemp != null) { - lightingView.SetViewStatus(lightTemp.value == "on"); + lightingView.SetViewStatus(lightTemp.state == "on"); } #endregion #region 淇敼鏃堕棿 - var hotDryTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.HotDryTimeLeft); + var hotDryTimeLeftTemp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.HotDryTimeLeft); if (hotDryTimeLeftTemp != null) { - hotDryView.ChangeTime(hotDryTimeLeftTemp.value); - MainPage.Log($"鐑樺共鍓╀綑鏃堕棿{hotDryTimeLeftTemp.value}"); + hotDryView.ChangeTime(hotDryTimeLeftTemp.state); } - var windDryTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.WindDryTimeLeft); + var windDryTimeLeftTemp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.WindDryTimeLeft); if (windDryTimeLeftTemp != null) { - windDryView.ChangeTime(windDryTimeLeftTemp.value); - MainPage.Log($"椋庡共鍓╀綑鏃堕棿{windDryTimeLeftTemp.value}"); + windDryView.ChangeTime(windDryTimeLeftTemp.state); } - var disinfectTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.DisinfectTimeLeft); + var disinfectTimeLeftTemp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.DisinfectTimeLeft); if (disinfectTimeLeftTemp != null) { - disinfectView.ChangeTime(disinfectTimeLeftTemp.value); - MainPage.Log($"娑堟瘨鍓╀綑鏃堕棿{disinfectTimeLeftTemp.value}"); + disinfectView.ChangeTime(disinfectTimeLeftTemp.state); } #endregion @@ -439,18 +432,6 @@ #endregion #region 鈻� 涓�鑸柟娉昣__________________________ - - /// <summary> - /// 鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� - /// </summary> - private void RefreshNowDeviceStatuMemory(Function i_LocalDevice) - { - foreach (var data in i_LocalDevice.status) - { - //寮�鍏� - //if (data.key == "on_off") { this.weepRobotData.Cleaning = data.value.ToLower() == "on"; } - } - } #endregion } -- Gitblit v1.8.0