From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期三, 22 六月 2022 11:22:18 +0800
Subject: [PATCH] 修改引用路径

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs |   49 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
index b15ad79..fba00d3 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>
@@ -131,30 +136,35 @@
             }
 
             this.btnDeviceName = new FrameCaptionInputControl(caption, nameValue, listview.rowSpace / 2);
+            this.btnDeviceName.txtInput.MaxByte = 48;//闄愬埗鍙兘杈撳叆48涓瓧鑺�
             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 +194,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;
             }
@@ -337,7 +348,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