From f9f9b0030fdd2691632569b7dcad9d0ddca5e4cf Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 23 十二月 2020 09:28:54 +0800 Subject: [PATCH] 2020-12-23 1.调整mqtt挤下线,跑ui线程。2.LoadEvent_CheckLinkStatus方法调整 --- HDL_ON/Entity/Function/Scene.cs | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs index c6ad0eb..a369fa7 100644 --- a/HDL_ON/Entity/Function/Scene.cs +++ b/HDL_ON/Entity/Function/Scene.cs @@ -236,23 +236,17 @@ { Application.RunOnMainThread(() => { - if (time / 60 > 1) + if (time > 60) { - btnShowDelay.Text = (time / 60).ToString() + "min"; + btnShowDelay.Text = (time / 60).ToString() + "min" + time % 60 + "s"; } else { - btnShowDelay.Text = (time--).ToString() + "s"; + btnShowDelay.Text = time.ToString() + "s"; } }); - if (time / 60 > 1) - { - System.Threading.Thread.Sleep(time / 60 * 60000); - } - else - { - System.Threading.Thread.Sleep(1000); - } + System.Threading.Thread.Sleep(1000); + time--; } Application.RunOnMainThread(() => { -- Gitblit v1.8.0