From 9c16d3614d9b88c637f967518a329f239fcd3aaf Mon Sep 17 00:00:00 2001 From: lss <316519258@qq.com> Date: 星期五, 12 六月 2020 09:22:04 +0800 Subject: [PATCH] 2020.06.12 --- ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorWorkModeMenuForm.cs index b097cc1..39ffcf6 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; @@ -205,6 +205,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,7 +223,7 @@ 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)); }; @@ -236,13 +237,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 +263,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