From e79b65b97a8ae1eae5ee172dea1b52d041006599 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 02 九月 2020 17:24:32 +0800
Subject: [PATCH] 2020-09-02-3
---
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs | 53 ++++++++++++++++++++++++++++++++++-------------------
1 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
index 7f2f4d4..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)
{
//涓嶅啀璇诲彇
@@ -481,7 +496,7 @@
btnIcon.RadiusEx = 16;
btnIcon.BorderWidth = 2;
btnIcon.BorderColor = 0xff979797;
- frame.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
+ frame.AddChidren(btnIcon, ChidrenBindMode.BindEvent);
//鐐瑰嚮浜嬩欢
frame.ButtonClickEvent += (sender, e) =>
{
--
Gitblit v1.8.0