From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs | 27 +++++++++------------------ 1 files changed, 9 insertions(+), 18 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs index cdb3057..4fc958a 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceRelayDetailCardForm.cs @@ -47,7 +47,7 @@ this.InitLightControl(frameWhiteBack); } //璁剧疆鐘舵�佹枃瀛� - this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); + this.SetStatuText(HdlDeviceCommonLogic.Current.GetMainPageDeviceStatuText(this.device)); } #endregion @@ -215,9 +215,6 @@ /// <param name="isOpen">鎵撳紑鐘舵��</param> private void RefreshSwitchStatu(bool isOpen) { - //鐘舵�佷竴鑷�(绗簩绱㈠紩鐨勬帶浠跺鏋滄槸閫夋嫨鐘舵��,鍒欏繀瀹氫负寮�鐘舵��) - if (listControl[1].IsSelected == isOpen) { return; } - //鍙樻洿鐘舵�� if (this.device.DfunctionType == DeviceFunctionType.A寮�鍏�) { @@ -232,6 +229,8 @@ listControl[0].IsSelected = isOpen; listControl[1].IsSelected = isOpen; } + //璁剧疆鐘舵�佹枃瀛� + this.SetStatuText(HdlDeviceCommonLogic.Current.GetMainPageDeviceStatuText(this.device)); } #endregion @@ -252,8 +251,6 @@ { //鍙樻洿鍗$墖鐘舵�� this.RefreshSwitchStatu(((LightBase)this.device).OnOffStatus == 1); - //璁剧疆鐘舵�佹枃瀛� - this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); }); return true; } @@ -276,36 +273,30 @@ ((LightBase)this.device).OnOffStatus = isOpen == true ? 1 : 0; //鍙樻洿鍗$墖鐘舵�� this.RefreshSwitchStatu(((LightBase)this.device).OnOffStatus == 1); - //璁剧疆鐘舵�佹枃瀛� - this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); return; } //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅 this.StartCheckResponeResult(this.listControl, (result) => { - //娌℃湁鎺ユ敹鍒扮綉鍏冲洖澶� - if (result == false) + //鎺ユ敹鍒扮綉鍏冲洖澶� + if (result == true) { HdlThreadLogic.Current.RunMain(() => - { - //璁剧疆鐘舵�佹枃瀛� - this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device)); + { + //鍙樻洿鍗$墖鐘舵�� + bool statu = ((LightBase)this.device).OnOffStatus == 1; + this.RefreshSwitchStatu(statu); }); } }); - //鍙樻洿鍗$墖鐘舵�� - this.RefreshSwitchStatu(isOpen); - if (isOpen == true) { //鎵撳紑 - this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1)); this.device.SwitchControl(1); } else { //鍏抽棴 - this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close)); this.device.SwitchControl(0); } } -- Gitblit v1.8.0