From e747e6d8524e3146bb48dc304a713f309966b1c6 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 19 五月 2020 13:10:03 +0800 Subject: [PATCH] 新版本 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs index 0996841..8082a1b 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs @@ -845,23 +845,24 @@ btnFunction.AddLeftCaption(caption, 600); //寮�鍏冲浘鏍� var btnSwitch = btnFunction.AddMostRightSwitchIcon(); - //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹呯殑璇�,璁╂墍鏈夎彍鍗曢兘涓嶈兘鐐瑰嚮 - if (Common.Config.Instance.Home.IsVirtually == true) - { - btnSwitch.CanClick = false; - } //搴曠嚎 btnFunction.AddBottomLine(); - btnSwitch.ButtonClickEvent += async (sender, e) => + btnSwitch.ButtonClickEvent += (sender, e) => { //鍒囨崲妯″紡 bool statu = !btnSwitch.IsSelected; - var result = await HdlDeviceCurtainLogic.Current.SetHandPullControl(deviceCurtain, statu); + var result = HdlDeviceCurtainLogic.Current.SetHandPullControl(deviceCurtain, statu); if (result == true) { btnSwitch.IsSelected = statu; } }; + //濡傛灉鏄櫄鎷熶綇瀹� + if (Common.Config.Instance.Home.IsVirtually == true) + { + btnSwitch.IsSelected = ModelData.DeviceModelDataLogic.Current.GetCurtainHandPullControl(deviceCurtain); + return; + } //娣诲姞灞炴�т笂鎶ョ洃鍚� string mainkeys = LocalDevice.Current.GetDeviceMainKeys(this.listNewDevice[0]); @@ -1117,11 +1118,11 @@ /// 璁惧閲嶅懡鍚� /// </summary> /// <param name="i_deviceName">deviceName.</param> - private async void DeviceReName(string i_deviceName, bool closeForm) + private void DeviceReName(string i_deviceName, bool closeForm) { //淇敼MAC鍚� string deviceName = i_deviceName.Trim(); - var result = await Common.LocalDevice.Current.ReMacName(this.listNewDevice, deviceName); + var result = Common.LocalDevice.Current.ReMacName(this.listNewDevice, deviceName); if (result == false) { return; -- Gitblit v1.8.0