From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs | 43 ++++++++++++++++++++++++++++++++----------- 1 files changed, 32 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs index b097cc1..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 @@ -205,6 +220,7 @@ } //璁╁畠澶勪簬5鐨勬暣鍊嶆暟 this.pirConfigure.iasReportPeriod = (this.pirConfigure.iasReportPeriod / 5) * 5; + int index = listTime.IndexOf(this.pirConfigure.iasReportPeriod + miao); //涓婃姤闂撮殧 var row3 = new FrameRowControl(listView.rowSpace / 2); @@ -222,10 +238,15 @@ btnStatu3.Text = listTime[value]; this.pirConfigure.iasReportPeriod = Convert.ToInt32(listTime[value].Replace(miao, string.Empty)); - }, 0, btnCaption3.Text, + }, index == -1 ? 0 : index, btnCaption3.Text, Language.StringByID(R.MyInternationalizationString.uFinish), Language.StringByID(R.MyInternationalizationString.uCancel)); }; + //鏌ョ湅妯℃澘鏃�,涓嶅厑璁哥紪杈� + if (Common.Config.Instance.Home.IsShowTemplate == true) + { + row3.CanClick = false; + } } #endregion @@ -236,13 +257,13 @@ /// 鑾峰彇鍒濆鏁版嵁 /// </summary> /// <returns></returns> - private async Task<bool> GetDeviceAllDefultData() + private bool GetDeviceAllDefultData() { //鎵撳紑杩涘害鏉� this.ShowProgressBar(); - - //鑾峰彇鐏厜鐨勯厤缃俊鎭� - this.pirConfigure = await HdlDevicePirSensorLogic.Current.GetPirSensorLightSettion(this.iASZone); + + //鑾峰彇PIR浼犳劅鍣ㄧ殑銆愰厤缃俊鎭�� + this.pirConfigure = HdlDevicePirSensorLogic.Current.GetPirSensorLightSettion(this.iASZone); if (pirConfigure == null) { //鍏抽棴杩涘害鏉� @@ -262,12 +283,12 @@ /// <summary> /// 淇濆瓨Pir浼犳劅鍣ㄦ暟鎹� /// </summary> - private async void SavePirSensorData() + private void SavePirSensorData() { //鎵撳紑杩涘害鏉� this.ShowProgressBar(); //淇濆瓨閰嶇疆淇℃伅 - var result = await HdlDevicePirSensorLogic.Current.SetPirSensorSettion(this.iASZone, this.pirConfigure); + var result = HdlDevicePirSensorLogic.Current.SetPirSensorSettion(this.iASZone, this.pirConfigure); //鍏抽棴杩涘害鏉� this.CloseProgressBar(); -- Gitblit v1.8.0