From 351bdda734832d821a9764b0cde8be5d83c4ec50 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 01 十二月 2022 09:56:25 +0800
Subject: [PATCH] 2022年12月01日09:56:23

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs
index 0964bf2..428221f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs
@@ -41,10 +41,10 @@
             //璁剧疆澶撮儴淇℃伅
             base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uWorkMode));
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //鑾峰彇鍒濆鏁版嵁
-                var result = await this.GetDeviceAllDefultData();
+                var result = this.GetDeviceAllDefultData();
                 if (result == false)
                 {
                     return;
@@ -103,6 +103,11 @@
                     this.SavePirSensorData();
                 });
             };
+            //鏌ョ湅妯℃澘鏃�,涓嶅厑璁哥紪杈�
+            if (Common.Config.Instance.Home.IsShowTemplate == true)
+            {
+                btnSave.CanClick = false;
+            }
         }
 
         #endregion
@@ -132,7 +137,7 @@
             row1.ButtonClickEvent += (sender, e) =>
             {
                 var form = new BottomItemSelectForm();
-                form.AddForm(btnCaption1.Text, listSelect, this.pirConfigure.mode == 0 ? 1 : 0);
+                form.AddForm(btnCaption1.Text, listSelect, null, this.pirConfigure.mode == 0 ? 1 : 0);
                 form.FinishSelectEvent += (value) =>
                 {
                     this.isDataChanged = true;
@@ -141,6 +146,11 @@
                     this.pirConfigure.mode = value == 0 ? 1 : 0;
                 };
             };
+            //鏌ョ湅妯℃澘鏃�,涓嶅厑璁哥紪杈�
+            if (Common.Config.Instance.Home.IsShowTemplate == true)
+            {
+                row1.CanClick = false;
+            }
         }
 
         #endregion
@@ -170,7 +180,7 @@
             row2.ButtonClickEvent += (sender, e) =>
             {
                 var form = new BottomItemSelectForm();
-                form.AddForm(btnCaption2.Text, listSelect, this.pirConfigure.type);
+                form.AddForm(btnCaption2.Text, listSelect, null, this.pirConfigure.type);
                 form.FinishSelectEvent += (value) =>
                 {
                     this.isDataChanged = true;
@@ -185,6 +195,11 @@
                     }
                 };
             };
+            //鏌ョ湅妯℃澘鏃�,涓嶅厑璁哥紪杈�
+            if (Common.Config.Instance.Home.IsShowTemplate == true)
+            {
+                row2.CanClick = false;
+            }
         }
 
         #endregion
@@ -227,6 +242,11 @@
                 Language.StringByID(R.MyInternationalizationString.uFinish),
                 Language.StringByID(R.MyInternationalizationString.uCancel));
             };
+            //鏌ョ湅妯℃澘鏃�,涓嶅厑璁哥紪杈�
+            if (Common.Config.Instance.Home.IsShowTemplate == true)
+            {
+                row3.CanClick = false;
+            }
         }
 
         #endregion
@@ -237,7 +257,7 @@
         /// 鑾峰彇鍒濆鏁版嵁
         /// </summary>
         /// <returns></returns>
-        private async Task<bool> GetDeviceAllDefultData()
+        private bool GetDeviceAllDefultData()
         {
             //鎵撳紑杩涘害鏉�
             this.ShowProgressBar();

--
Gitblit v1.8.0