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/UserCenter/Safety/GarrisonAreaDelayedSettionForm.cs | 44 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaDelayedSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaDelayedSettionForm.cs
index bff1dff..2675dde 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaDelayedSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaDelayedSettionForm.cs
@@ -97,7 +97,7 @@
//鍏抽棴杩涘害鏉�
this.CloseProgressBar();
- Application.RunOnMainThread(() =>
+ HdlThreadLogic.Current.RunMain(() =>
{
//鍒濆鍖栥�愯繘鍏ュ欢鏃躲�戣
this.InitInDelayedRow(listView);
@@ -129,7 +129,7 @@
row.AddBottomLine();
//鏃堕棿
string second = Language.StringByID(R.MyInternationalizationString.Second);
- this.inDelayTimeControl = row.AddMostRightView(this.timeResponseData.EntranceDelayTime + " " + second, 200);
+ this.inDelayTimeControl = row.AddMostRightView(this.GetTimeText(this.timeResponseData.EntranceDelayTime), 200);
this.inDelayTimeControl.TextColor = UserCenterColor.Current.TextGrayColor1;
row.ButtonClickEvent += (sender, e) =>
@@ -158,7 +158,7 @@
row.AddRightArrow();
//鏃堕棿
string second = Language.StringByID(R.MyInternationalizationString.Second);
- this.outDelayTimeControl = row.AddMostRightView(this.timeResponseData.GoOutDelayTime + " " + second, 200);
+ this.outDelayTimeControl = row.AddMostRightView(this.GetTimeText(this.timeResponseData.GoOutDelayTime), 200);
this.outDelayTimeControl.TextColor = UserCenterColor.Current.TextGrayColor1;
row.ButtonClickEvent += (sender, e) =>
@@ -190,16 +190,17 @@
//淇敼缂撳瓨
this.timeResponseData.EntranceDelayTime = inDelayTime;
this.timeResponseData.GoOutDelayTime = OutDelayTime;
- Application.RunOnMainThread(() =>
+ HdlThreadLogic.Current.RunMain(() =>
{
- string second = Language.StringByID(R.MyInternationalizationString.Second);
if (this.inDelayTimeControl != null)
{
- this.inDelayTimeControl.Text = inDelayTime + " " + second;
+ //鏄剧ず鏃堕棿缈昏瘧鏂囨湰
+ this.inDelayTimeControl.Text = this.GetTimeText(inDelayTime);
}
if (this.outDelayTimeControl != null)
{
- this.outDelayTimeControl.Text = OutDelayTime + " " + second;
+ //鏄剧ず鏃堕棿缈昏瘧鏂囨湰
+ this.outDelayTimeControl.Text = this.GetTimeText(OutDelayTime);
}
});
}
@@ -286,5 +287,34 @@
}
#endregion
+
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ /// <summary>
+ /// 鑾峰彇鏃堕棿鐨勭炕璇戞枃鏈�
+ /// </summary>
+ /// <param name="timeSecond">绉�</param>
+ /// <returns></returns>
+ private string GetTimeText(int timeSecond)
+ {
+ string textValue = string.Empty;
+ //鍒�
+ int checkValue = timeSecond / 60;
+ if (checkValue > 0)
+ {
+ string minu = Language.StringByID(R.MyInternationalizationString.uMinute);
+ textValue = checkValue + minu;
+ }
+ //绉�
+ checkValue = timeSecond % 60;
+ if (checkValue > 0)
+ {
+ string second = Language.StringByID(R.MyInternationalizationString.uSecond);
+ textValue += checkValue + second;
+ }
+ return textValue;
+ }
+
+ #endregion
}
}
--
Gitblit v1.8.0