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/PanelFunctionSettionForm.cs |   46 ++++++++++++++++++++++++++++------------------
 1 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
index 2b149e4..b355398 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
@@ -113,6 +113,11 @@
                 //鍏抽棴鑷韩
                 this.CloseForm();
             };
+            //濡傛灉褰撳墠鏄睍绀烘ā鏉�,鍒欎笉鑳界紪杈�
+            if (Common.Config.Instance.Home.IsShowTemplate == true)
+            {
+                btnFinish.CanClick = false;
+            }
         }
 
         /// <summary>
@@ -134,27 +139,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.uDeviceEpointReNoteSuccess);
-                    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.uDeviceEpointReNoteSuccess);
+                        this.ShowMassage(ShowMsgType.Tip, msg);
+                    }
+                };
+            }
 
             //鎵�灞炲尯鍩�
             var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
@@ -184,7 +193,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;
             }

--
Gitblit v1.8.0