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/MainPage/Controls/SceneCardControl.cs | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs index 645b3dc..c674940 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs @@ -60,6 +60,7 @@ this.ButtonClickEvent += (sender, e) => { //璋冪敤鍦烘櫙 + this.CanClick = false; this.SetSceneAction(); }; } @@ -125,12 +126,17 @@ timeSelect.Init(); timeSelect.TimeAction = (time) => { + //閫夋嫨鐨勬槸涓嶅紑鍚� + if (time == 0) { return; } + i_scene.SceneDelayTime = time; //鏃堕棿鍥炬爣涓嶆樉绀� this.btnTimeIcon.Visible = false; //鏄剧ず鍓╀綑鐨勬椂闂� this.btnTimeView.Text = this.GetTimeString(time, hourText, minuText, secondText); + //閫夋嫨寤舵椂鏃�,闇�瑕佸埛鏂颁富椤� + UserView.UserPage.Instance.RefreshAllForm = true; }; }; @@ -195,7 +201,13 @@ var result = await HdlSceneLogic.Current.ControlScene(scene); if (result == false) { + this.CanClick = true; return; + } + if (scene.SceneDelayTime > 0) + { + //璋冪敤鏈夊欢鏃剁殑鍦烘櫙,闇�瑕佸埛鏂颁富椤� + UserView.UserPage.Instance.RefreshAllForm = true; } //淇敼鏃堕棿 scene.RemainTime = scene.SceneDelayTime; @@ -236,6 +248,7 @@ } //寮�鍚欢鏃跺�掕鏃剁壒鏁� + this.CanClick = false; this.StartRemainTimeApreal(i_scene); } @@ -251,6 +264,7 @@ { if (i_scene.RemainTime <= 0) { + this.CanClick = true; return; } int remainTine = i_scene.RemainTime; @@ -271,20 +285,21 @@ while (remainTine > 0 && this.Parent != null) { System.Threading.Thread.Sleep(1000); - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { this.btnTimeView.Text = this.GetTimeString(remainTine, hourText, minuText, secondText); - }); + }, ShowErrorMode.NO); remainTine--; } - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { //鍊掕鏃剁粨鏉熸椂锛屾椂闂村浘鏍囨樉绀� this.btnTimeIcon.Visible = true; this.btnTimeView.Text = string.Empty; //鐩存帴寮�鍚疞oading鐗规晥 this.StartLoadingApreal(); - }); + this.CanClick = true; + }, ShowErrorMode.NO); }) { IsBackground = true }.Start(); } -- Gitblit v1.8.0