From dee21bf452a8979d0515d13e534fbb69ed9715dd Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 01 九月 2020 15:33:13 +0800 Subject: [PATCH] 上传一个版本 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs | 51 +++++++++++++++++++++++++++++++++------------------ 1 files changed, 33 insertions(+), 18 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs index fb3e925..1f40a4c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs @@ -126,6 +126,11 @@ //鍏抽棴鑷韩 this.CloseForm(); }; + //濡傛灉褰撳墠鏄睍绀烘ā鏉�,鍒欎笉鑳界紪杈� + if (Common.Config.Instance.Home.IsShowTemplate == true) + { + btnFinish.CanClick = false; + } } /// <summary> @@ -147,27 +152,31 @@ listview.AddChidren(btnDeviceName); btnDeviceName.InitControl(); btnDeviceName.AddBottomLine(); - btnDeviceName.txtInput.FinishInputEvent += () => + //濡傛灉褰撳墠鏄睍绀烘ā鏉�,鍒欎笉鑳界紪杈� + if (Common.Config.Instance.Home.IsShowTemplate == false) { - string oldName = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice); - if (btnDeviceName.Text.Trim() == string.Empty) + btnDeviceName.txtInput.FinishInputEvent += () => { - //灏嗗悕瀛楄繕鍘� - btnDeviceName.Text = oldName; - } - if (oldName != btnDeviceName.Text.Trim()) - { - //璁惧鍚嶇О淇敼 - var result = Common.LocalDevice.Current.ReName(nowSelectDevice, btnDeviceName.Text.Trim()); - if (result == false) + string oldName = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice); + if (btnDeviceName.Text.Trim() == string.Empty) { - return; + //灏嗗悕瀛楄繕鍘� + btnDeviceName.Text = oldName; } - //鎸夐敭澶囨敞淇敼鎴愬姛! - string msg = Language.StringByID(R.MyInternationalizationString.uPanelButtonReNoteSuccess); - this.ShowMassage(ShowMsgType.Tip, msg); - } - }; + if (oldName != btnDeviceName.Text.Trim()) + { + //璁惧鍚嶇О淇敼 + var result = Common.LocalDevice.Current.ReName(nowSelectDevice, btnDeviceName.Text.Trim()); + if (result == false) + { + return; + } + //鎸夐敭澶囨敞淇敼鎴愬姛! + string msg = Language.StringByID(R.MyInternationalizationString.uPanelButtonReNoteSuccess); + this.ShowMassage(ShowMsgType.Tip, msg); + } + }; + } //鎵�灞炲尯鍩� var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2); @@ -202,7 +211,8 @@ private void InitTopRightMenu() { //妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘 - if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false) + if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false + || Common.Config.Instance.Home.IsShowTemplate == true) { return; } @@ -373,6 +383,11 @@ btnSwitch.CanClick = true; }); }; + //濡傛灉褰撳墠鏄睍绀烘ā鏉�,鍒欎笉鑳界紪杈� + if (Common.Config.Instance.Home.IsShowTemplate == true) + { + btnSwitch.CanClick = false; + } if (hadReadVibrationInfo == true) { //涓嶅啀璇诲彇 -- Gitblit v1.8.0