From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs |   54 +++++++++++++++++++++++++++++++++---------------------
 1 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs
index 1875cda..c06b97a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitSettionForm.cs
@@ -97,31 +97,37 @@
             string caption = Language.StringByID(R.MyInternationalizationString.uDeviceNote);
             string nameValue = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
             var btnNote = new FrameCaptionInputControl(caption, nameValue, listview.rowSpace / 2);
+            btnNote.txtInput.MaxByte = 48;//闄愬埗鍙兘杈撳叆48涓瓧鑺�
             listview.AddChidren(btnNote);
             btnNote.InitControl();
             //鍒掔嚎
             btnNote.AddBottomLine();
             btnNote.txtInput.FinishInputEvent += () =>
-             {
-                 string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
-                 if (btnNote.Text.Trim() == string.Empty)
-                 {
-                     //灏嗗悕瀛楄繕鍘�
-                     btnNote.Text = oldName;
-                 }
-                 if (oldName != btnNote.Text)
-                 {
-                     //璁惧鍚嶇О淇敼
-                     var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
-                     if (result == false)
-                     {
-                         return;
-                     }
-                     //璁惧澶囨敞淇敼鎴愬姛!
-                     string msg = Language.StringByID(R.MyInternationalizationString.uDeviceReNoteSuccess);
-                     this.ShowMassage(ShowMsgType.Tip, msg);
-                 }
-             };
+            {
+                string oldName = Common.LocalDevice.Current.GetDeviceEpointName(deviceAc);
+                if (btnNote.Text.Trim() == string.Empty)
+                {
+                    //灏嗗悕瀛楄繕鍘�
+                    btnNote.Text = oldName;
+                }
+                if (oldName != btnNote.Text)
+                {
+                    //鏌ョ湅妯℃澘鏃�,涓嶅厑璁哥紪杈�
+                    if (Common.Config.Instance.Home.IsShowTemplate == true)
+                    {
+                        return;
+                    }
+                    //璁惧鍚嶇О淇敼
+                    var result = Common.LocalDevice.Current.ReName(deviceAc, btnNote.Text);
+                    if (result == false)
+                    {
+                        return;
+                    }
+                    //璁惧澶囨敞淇敼鎴愬姛!
+                    string msg = Language.StringByID(R.MyInternationalizationString.uDeviceReNoteSuccess);
+                    this.ShowMassage(ShowMsgType.Tip, msg);
+                }
+            };
 
             //璁惧绫诲瀷
             caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
@@ -215,6 +221,12 @@
                 }
                 this.CloseForm();
             };
+            //鏌ョ湅妯℃澘鏃�,涓嶅厑璁哥紪杈�
+            if (Common.Config.Instance.Home.IsShowTemplate == true)
+            {
+                btnFinish.CanClick = false;
+                btnSwingSwitch.CanClick = false;
+            }
         }
 
         #endregion
@@ -270,7 +282,7 @@
             //濡傛灉鏄櫄鎷熶綇瀹�
             if (Common.Config.Instance.Home.IsVirtually == true)
             {
-                var data = ModelData.DeviceModelDataLogic.Current.GetAcSwingModeSupport(deviceAc);
+                var data = TemplateData.TemplateDeviceDataLogic.Current.GetAcSwingModeSupport(deviceAc);
                 //杞崲涓轰簩杩涘埗
                 var value = Convert.ToString(data, 2).PadLeft(16, '0');
                 //杩欎釜璁剧疆鏄斁鍦ㄥ悗闈㈢殑

--
Gitblit v1.8.0