From 37c315988c2dc11e4f477233f7a9f87d57bb61aa Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期一, 08 三月 2021 09:17:15 +0800
Subject: [PATCH] 数据结构优化修改
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
index 3255433..57119a2 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -450,8 +450,6 @@
/// </summary>
public bool Lighting = false;
-
-
public ClothesHangerControl(string iconPath1, string iconPath2, string title, string time)
{
btnIcon = new Button()
@@ -478,7 +476,7 @@
btnTime = new Button()
{
Gravity = Gravity.CenterHorizontal,
- Y = btnTitle.Bottom,
+ Y = Application.GetRealHeight(74-32),
Height = Application.GetRealHeight(32),
Text = time,
TextColor = 0x00000000,
@@ -494,29 +492,28 @@
public void ChangeTime(string newTime)
{
int.TryParse(newTime, out leftTime);
- leftTime *= 60;
if (countdownThread == null)
{
countdownThread = new System.Threading.Thread(() =>
{
while (true)
{
- if (leftTime > 1)
+ if (leftTime > 0)
{
Application.RunOnMainThread(() =>
{
- btnTime.Text = new TimeSpan(0, 0, leftTime).ToString();
+ btnTime.Text = new TimeSpan(0, leftTime, 0).ToString().Remove(5,3) ;
});
- System.Threading.Thread.Sleep(1000);
leftTime--;
}
- else
+ else if(leftTime == 0)
{
Application.RunOnMainThread(() =>
{
btnTime.Text = "";
});
}
+ System.Threading.Thread.Sleep(60000);
}
})
{ IsBackground = true };
--
Gitblit v1.8.0