From b621c50182f42a095b75fc08584240905e22d944 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 24 三月 2021 15:24:20 +0800
Subject: [PATCH] 2021-03-24 1.修改时间选择控件不调用系统的时间选择器,实现自定义时间选择器。 2.优化注册和忘记密码页面,增加倒计时和重发按钮功能
---
Crabtree/SmartHome/UI/SimpleControl/R.cs | 5
Crabtree/ON/Assets/Language.ini | 2
Crabtree/ON.Ios/Resources/Language.ini | 3
Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs | 83 +++++++++++
Crabtree/.vs/SmartHome/xs/UserPrefs.xml | 15 +-
Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs | 220 +++++++++++++++++++++++-------
Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs | 85 +++++++++++
Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs | 7
8 files changed, 344 insertions(+), 76 deletions(-)
diff --git a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
index ccee2f0..ddaa76b 100644
--- a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
+++ b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
@@ -1,15 +1,12 @@
锘�<Properties StartupConfiguration="{1D83BF28-BA88-4152-BA41-D7EFE90A5437}|Default">
<MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.Android_Accelerated_Oreo" />
<MonoDevelop.Ide.Workbench>
- <Files>
- <File FileName="SmartHome/UI/SimpleControl/Phone/Schedule/Method.cs" Line="83" Column="20" />
- </Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="SmartHome" expanded="True">
- <Node name="ON.Droid" expanded="True" selected="True">
- <Node name="Properties" expanded="True" />
+ <Node name="ON.Droid" expanded="True">
+ <Node name="Assets" expanded="True" />
</Node>
<Node name="Shared" expanded="True">
<Node name="DLL" expanded="True" />
@@ -26,8 +23,12 @@
<Node name="UI" expanded="True">
<Node name="SimpleControl" expanded="True">
<Node name="Phone" expanded="True">
+ <Node name="Register" expanded="True" />
<Node name="Scene" expanded="True" />
- <Node name="Schedule" expanded="True" />
+ <Node name="Schedule" expanded="True">
+ <Node name="Method.cs" selected="True" />
+ </Node>
+ <Node name="User" expanded="True" />
</Node>
</Node>
</Node>
@@ -45,7 +46,7 @@
<String>IosService/IosService.csproj</String>
<String>DroidService/DroidService.csproj</String>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
<MonoDevelop.Ide.ItemProperties.ON.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
diff --git a/Crabtree/ON.Ios/Resources/Language.ini b/Crabtree/ON.Ios/Resources/Language.ini
index aeb2229..66da5b3 100644
--- a/Crabtree/ON.Ios/Resources/Language.ini
+++ b/Crabtree/ON.Ios/Resources/Language.ini
@@ -1110,6 +1110,7 @@
20059=Device and scene data are successfully synchronized to the cloud!
20060=Failed to sync the device and scene data to the cloud!
20061=Do you want to synchronize all local devices and scenes to the cloud? This will be used for schedule and alexa control functions.
+20062=Resend
[Chinese]
1=浣犲ソ
@@ -2222,7 +2223,7 @@
20059=Device and scene data are successfully synchronized to the cloud!
20060=Failed to sync the device and scene data to the cloud!
20061=Do you want to synchronize all local devices and scenes to the cloud? This will be used for schedule and alexa control functions.
-
+20062=Resend
[Czech]
1=Nazdar
diff --git a/Crabtree/ON/Assets/Language.ini b/Crabtree/ON/Assets/Language.ini
index fd38bf9..e5ca076 100644
--- a/Crabtree/ON/Assets/Language.ini
+++ b/Crabtree/ON/Assets/Language.ini
@@ -1110,6 +1110,7 @@
20059=Device and scene data are successfully synchronized to the cloud!
20060=Failed to sync the device and scene data to the cloud!
20061=Do you want to synchronize all local devices and scenes to the cloud? This will be used for schedule and alexa control functions.
+20062=Resend
[Chinese]
1=浣犲ソ
@@ -2222,6 +2223,7 @@
20059=Device and scene data are successfully synchronized to the cloud!
20060=Failed to sync the device and scene data to the cloud!
20061=Do you want to synchronize all local devices and scenes to the cloud? This will be used for schedule and alexa control functions.
+20062=Resend
[Czech]
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs
index 6200b11..8e90dce 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs
@@ -83,8 +83,8 @@
//etAccount.Text = "18824864143";
//etAccount.Text = "cjl@hdlchina.com.cn";
- //etAccount.Text = "2791308028@qq.com";
- etAccount.Text = "858539859@qq.com";
+ etAccount.Text = "2791308028@qq.com";
+ //etAccount.Text = "858539859@qq.com";
#endif
accountView.AddChidren (etAccount);
@@ -138,7 +138,8 @@
};
#if DEBUG
//etPasswrod.Text = "123456";
- etPasswrod.Text = "123456-Aa";
+ //etPasswrod.Text = "123456-Aa";
+ etPasswrod.Text = "123456-Bb";
#endif
passwrodView.AddChidren (etPasswrod);
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs
index 27137d9..c6686a3 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/AccountRegistration.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Text.RegularExpressions;
+using System.Threading;
namespace Shared.SimpleControl.Phone
{
@@ -157,7 +158,9 @@
/// </summary>
/// <param name="account">璐﹀彿 閭鎴栬�呮墜鏈哄彿</param>
/// <param name="isPhone">鏄惁鏄墜鏈�</param>
- void SendVerificationCode (string account, bool isPhone = true)
+ /// <param name="isResend"></param>
+ /// <param name="btnResend"></param>
+ void SendVerificationCode (string account, bool isPhone = true, bool isResend = false, Button btnResend = null)
{
MainPage.Loading.Start (Language.StringByID (R.MyInternationalizationString.load));
System.Threading.Tasks.Task.Run (() => {
@@ -165,9 +168,14 @@
var requestRevertObj = HttpServerRequest.Current.VerificationCodeSend (VerifyType.REGISTER_USER, account);
if (requestRevertObj.Code == StateCode.SUCCESS) {
Application.RunOnMainThread (() => {
- // isPhone 鏄惁鏄墜鏈�
- InitSMSView (account, false);
- bodyPageView.PageIndex = bodyPageView.ChildrenCount - 1;
+ if (isResend) {
+ //濡傛灉鏄噸鍙戠殑
+ StartCountdown (btnResend);
+ } else {
+ // isPhone 鏄惁鏄墜鏈�
+ InitSMSView (account, false);
+ bodyPageView.PageIndex = bodyPageView.ChildrenCount - 1;
+ }
});
} else {
//鎻愮ず閿欒
@@ -328,9 +336,12 @@
mobileChencView.AddChidren (btnTitle);
EditText etCode = new EditText () {
- Width = Application.GetRealWidth (500),
+ //Width = Application.GetRealWidth (500),
+ //Height = Application.GetRealWidth (85),
+ //Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth (390),
Height = Application.GetRealWidth (85),
- Gravity = Gravity.CenterHorizontal,
+ X = Application.GetRealWidth (70),
Y = btnTitle.Bottom,
BorderWidth = 1,
Radius = 5,
@@ -339,6 +350,33 @@
TextColor = SkinStyle.Current.TextColor1
};
mobileChencView.AddChidren (etCode);
+
+ Button btnResend = new Button () {
+ Y = btnTitle.Bottom,
+ X = etCode.Right + Application.GetRealWidth (10),
+ Width = Application.GetRealWidth (100),
+ Height = Application.GetRealWidth (85),
+ BackgroundColor = SkinStyle.Current.MainColor,
+ SelectedBackgroundColor = SkinStyle.Current.SelectedColor,
+ //TextID = R.MyInternationalizationString.Resend,
+ Text = "Resend",
+ TextColor = SkinStyle.Current.TextColor1,
+ Radius = 5,
+ BorderColor = SkinStyle.Current.Transparent,
+ BorderWidth = 0,
+ TextSize = 15,
+ TextAlignment = TextAlignment.Center,
+ };
+ mobileChencView.AddChidren (btnResend);
+ btnResend.MouseDownEventHandler += (sender, e) => {
+ btnResend.IsSelected = true;
+ };
+ btnResend.MouseUpEventHandler += (sender, e) => {
+ btnResend.IsSelected = false;
+ Resend (mAccount, btnResend);
+ };
+ StartCountdown (btnResend);
+
Button btnConfirem = new Button () {
Gravity = Gravity.CenterHorizontal,
@@ -442,6 +480,41 @@
}
+ /// <summary>
+ /// 閲嶅彂
+ /// </summary>
+ void Resend (string account, Button btnResend)
+ {
+ SendVerificationCode (account, false, true, btnResend);
+ }
+ /// <summary>
+ /// 寮�濮嬭鏃�
+ /// </summary>
+ /// <param name="btnResend"></param>
+ void StartCountdown (Button btnResend)
+ {
+ if (btnResend == null) return;
+
+ btnResend.Enable = false;
+ int time = 60;
+
+ //2.1鑾峰彇楠岃瘉鐮佸�掕鏃�
+ new Thread (() => {
+ while (time > 0) {
+ time--;
+ Application.RunOnMainThread (() => {
+ btnResend.Text = time.ToString () + "s";
+ });
+ Thread.Sleep (1000);
+ }
+ Application.RunOnMainThread (() => {
+ //鍥炲鑾峰彇鐭俊鎸夐挳浜嬩欢
+ btnResend.Enable = true;
+ btnResend.TextID = R.MyInternationalizationString.Resend;
+ });
+ }) { IsBackground = true }.Start ();
+ }
}
+
}
\ No newline at end of file
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs
index 4f5c8a7..f34c1b0 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Register/ForgotPassword.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Text.RegularExpressions;
+using System.Threading;
namespace Shared.SimpleControl.Phone
{
@@ -160,7 +161,7 @@
/// </summary>
/// <param name="account">璐﹀彿 閭鎴栬�呮墜鏈哄彿</param>
/// <param name="isPhone">鏄惁鏄墜鏈�</param>
- void SendVerificationCode (string account, bool isPhone = true)
+ void SendVerificationCode (string account, bool isPhone = true, bool isResend = false, Button btnResend = null)
{
MainPage.Loading.Start (Language.StringByID (R.MyInternationalizationString.load));
System.Threading.Tasks.Task.Run (() => {
@@ -168,8 +169,14 @@
var requestRevertObj = HttpServerRequest.Current.VerificationCodeSend (VerifyType.FIND_PASSWORD, account);
if (requestRevertObj.Code.ToUpper () == StateCode.SUCCESS) {
Application.RunOnMainThread (() => {
- InitSMSView (account, false);
- bodyPageView.PageIndex = bodyPageView.ChildrenCount - 1;
+
+ if (isResend) {
+ //濡傛灉鏄噸鍙戠殑
+ StartCountdown (btnResend);
+ } else {
+ InitSMSView (account, false);
+ bodyPageView.PageIndex = bodyPageView.ChildrenCount - 1;
+ }
});
} else {
//鎻愮ず閿欒
@@ -271,9 +278,10 @@
mobileChencView.AddChidren (btnTitle);
EditText etCode = new EditText () {
- Width = Application.GetRealWidth (500),
+ Width = Application.GetRealWidth (390),
Height = Application.GetRealWidth (85),
- Gravity = Gravity.CenterHorizontal,
+ //Gravity = Gravity.CenterHorizontal,
+ X = Application.GetRealWidth (70),
Y = btnTitle.Bottom,
BorderWidth = 1,
Radius = 5,
@@ -282,6 +290,32 @@
TextColor = SkinStyle.Current.TextColor1
};
mobileChencView.AddChidren (etCode);
+
+ Button btnResend = new Button () {
+ Y = btnTitle.Bottom,
+ X = etCode.Right + Application.GetRealWidth (10),
+ Width = Application.GetRealWidth (100),
+ Height = Application.GetRealWidth (85),
+ BackgroundColor = SkinStyle.Current.MainColor,
+ SelectedBackgroundColor = SkinStyle.Current.SelectedColor,
+ //TextID = R.MyInternationalizationString.Resend,
+ Text = "Resend",
+ TextColor = SkinStyle.Current.TextColor1,
+ Radius = 5,
+ BorderColor = SkinStyle.Current.Transparent,
+ BorderWidth = 0,
+ TextSize = 15,
+ TextAlignment = TextAlignment.Center,
+ };
+ mobileChencView.AddChidren (btnResend);
+ btnResend.MouseDownEventHandler += (sender, e) => {
+ btnResend.IsSelected = true;
+ };
+ btnResend.MouseUpEventHandler += (sender, e) => {
+ btnResend.IsSelected = false;
+ Resend (mAccount, btnResend);
+ };
+ StartCountdown (btnResend);
Button btnConfirem = new Button () {
Y = etCode.Bottom + Application.GetRealWidth (50),
@@ -366,6 +400,45 @@
}
+
+ /// <summary>
+ /// 閲嶅彂
+ /// </summary>
+ void Resend (string account, Button btnResend)
+ {
+ SendVerificationCode (account, false, true, btnResend);
+ }
+
+ /// <summary>
+ /// 寮�濮嬭鏃�
+ /// </summary>
+ /// <param name="btnResend"></param>
+ void StartCountdown (Button btnResend)
+ {
+ if (btnResend == null) return;
+
+ btnResend.Enable = false;
+ int time = 60;
+
+ //2.1鑾峰彇楠岃瘉鐮佸�掕鏃�
+ new Thread (() =>
+ {
+ while (time > 0) {
+ time--;
+ Application.RunOnMainThread (() =>
+ {
+ btnResend.Text = time.ToString () + "s";
+ });
+ Thread.Sleep (1000);
+ }
+ Application.RunOnMainThread (() =>
+ {
+ //鍥炲鑾峰彇鐭俊鎸夐挳浜嬩欢
+ btnResend.Enable = true;
+ btnResend.TextID = R.MyInternationalizationString.Resend;
+ });
+ }) { IsBackground = true }.Start ();
+ }
}
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
index e96a79f..6046110 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
@@ -177,65 +177,69 @@
timeView.AddChidren (btnTimelbl);
btnTimelbl.MouseUpEventHandler += (timeSender, eee) => {
- var dialog = new Dialog ();
- var chooseTimeBodyView = new FrameLayout () {
- };
- dialog.AddChidren (chooseTimeBodyView);
- var chooseTime = new TimeView () {
- Y = Application.GetRealHeight (1136 - 420 - 90),
- Height = Application.GetRealHeight (420),
- BackgroundColor = 0xFFD7D7D7,
- //BackgroundColor = SkinStyle.Current.ViewColor,
- };
- chooseTimeBodyView.AddChidren (chooseTime);
+ ShowTimePickerView (btnTimelbl);
+ return;
- var bottomView = new FrameLayout () {
- Y = chooseTime.Bottom,
- Height = Application.GetRealHeight (90) + 1,
- BackgroundColor = 0xFFD7D7D7,
- };
- chooseTimeBodyView.AddChidren (bottomView);
+ //var dialog = new Dialog ();
+ //var chooseTimeBodyView = new FrameLayout () {
+ //};
+ //dialog.AddChidren (chooseTimeBodyView);
- var btnCloseTime = new Button () {
- Y = 1,
- Width = Application.GetRealWidth (320),
- BackgroundColor = SkinStyle.Current.ViewColor,
- TextID = R.MyInternationalizationString.Close,
- TextAlignment = TextAlignment.Center,
- TextColor = SkinStyle.Current.TextColor1,
- };
- bottomView.AddChidren (btnCloseTime);
- btnCloseTime.MouseUpEventHandler += (ddf, dddf) => {
- chooseTimeBodyView.RemoveAll ();
- chooseTimeBodyView.RemoveFromParent ();
- dialog.Close ();
- };
+ //var chooseTime = new TimeView () {
+ // Y = Application.GetRealHeight (1136 - 420 - 90),
+ // Height = Application.GetRealHeight (420),
+ // BackgroundColor = 0xFFD7D7D7,
+ // //BackgroundColor = SkinStyle.Current.ViewColor,
+ //};
+ //chooseTimeBodyView.AddChidren (chooseTime);
- var btnSaveTime = new Button () {
- X = btnCloseTime.Right + 1,
- Y = 1,
- Width = Application.GetRealWidth (320),
- TextID = R.MyInternationalizationString.SAVE,
- BackgroundColor = SkinStyle.Current.ViewColor,
- TextAlignment = TextAlignment.Center,
- TextColor = SkinStyle.Current.TextColor1,
- };
- bottomView.AddChidren (btnSaveTime);
- btnSaveTime.MouseUpEventHandler += (sender3, e3) => {
- // var chooseHour = chooseTime.Hour - timerTemp.TimeZone;
- var chooseTimeString = chooseTime.Hour.ToString ().PadLeft (2, '0') + ":" + chooseTime.Minute.ToString ().PadLeft (2, '0');
- //if (chooseTime.Hour > 12) {
- // chooseTimeString = (chooseTime.Hour -12) + ":" + chooseTime.Minute + " PM";
- //} else {
- // chooseTimeString = chooseTime.Hour + ":" + chooseTime.Minute + " AM";
- //}
- btnTimelbl.Text = chooseTimeString;
- dialog.Close ();
- };
+ //var bottomView = new FrameLayout () {
+ // Y = chooseTime.Bottom,
+ // Height = Application.GetRealHeight (90) + 1,
+ // BackgroundColor = 0xFFD7D7D7,
+ //};
+ //chooseTimeBodyView.AddChidren (bottomView);
+
+ //var btnCloseTime = new Button () {
+ // Y = 1,
+ // Width = Application.GetRealWidth (320),
+ // BackgroundColor = SkinStyle.Current.ViewColor,
+ // TextID = R.MyInternationalizationString.Close,
+ // TextAlignment = TextAlignment.Center,
+ // TextColor = SkinStyle.Current.TextColor1,
+ //};
+ //bottomView.AddChidren (btnCloseTime);
+ //btnCloseTime.MouseUpEventHandler += (ddf, dddf) => {
+ // chooseTimeBodyView.RemoveAll ();
+ // chooseTimeBodyView.RemoveFromParent ();
+ // dialog.Close ();
+ //};
+
+ //var btnSaveTime = new Button () {
+ // X = btnCloseTime.Right + 1,
+ // Y = 1,
+ // Width = Application.GetRealWidth (320),
+ // TextID = R.MyInternationalizationString.SAVE,
+ // BackgroundColor = SkinStyle.Current.ViewColor,
+ // TextAlignment = TextAlignment.Center,
+ // TextColor = SkinStyle.Current.TextColor1,
+ //};
+ //bottomView.AddChidren (btnSaveTime);
+ //btnSaveTime.MouseUpEventHandler += (sender3, e3) => {
+ // // var chooseHour = chooseTime.Hour - timerTemp.TimeZone;
+ // var chooseTimeString = chooseTime.Hour.ToString ().PadLeft (2, '0') + ":" + chooseTime.Minute.ToString ().PadLeft (2, '0');
+ // //if (chooseTime.Hour > 12) {
+ // // chooseTimeString = (chooseTime.Hour -12) + ":" + chooseTime.Minute + " PM";
+ // //} else {
+ // // chooseTimeString = chooseTime.Hour + ":" + chooseTime.Minute + " AM";
+ // //}
+ // btnTimelbl.Text = chooseTimeString;
+ // dialog.Close ();
+ //};
- dialog.Show ();
+ //dialog.Show ();
};
#endregion
@@ -729,6 +733,116 @@
};
}
+
+ /// <summary>
+ /// 鑷畾涔塗imePickerView
+ /// 2021-03-24
+ /// </summary>
+ void ShowTimePickerView (Button btnTimelbl)
+ {
+ var chooseTimeString = "00:00";
+ var dialog = new Dialog ();
+ var chooseTimeBodyView = new FrameLayout () {
+ };
+ dialog.AddChidren (chooseTimeBodyView);
+
+ var chooseTime = new UIPickerView () {
+ Y = Application.GetRealHeight (1136 - 420 - 90),
+ Height = Application.GetRealHeight (420),
+ BackgroundColor = 0xFFD7D7D7,
+ //BackgroundColor = SkinStyle.Current.ViewColor,
+ };
+ chooseTimeBodyView.AddChidren (chooseTime);
+
+ var bottomView = new FrameLayout () {
+ Y = chooseTime.Bottom,
+ Height = Application.GetRealHeight (90) + 1,
+ BackgroundColor = 0xFFD7D7D7,
+ };
+ chooseTimeBodyView.AddChidren (bottomView);
+
+ var btnCloseTime = new Button () {
+ Y = 1,
+ Width = Application.GetRealWidth (320),
+ BackgroundColor = SkinStyle.Current.ViewColor,
+ TextID = R.MyInternationalizationString.Close,
+ TextAlignment = TextAlignment.Center,
+ TextColor = SkinStyle.Current.TextColor1,
+ };
+ bottomView.AddChidren (btnCloseTime);
+ btnCloseTime.MouseUpEventHandler += (ddf, dddf) => {
+ chooseTimeBodyView.RemoveAll ();
+ chooseTimeBodyView.RemoveFromParent ();
+ dialog.Close ();
+ };
+
+ var btnSaveTime = new Button () {
+ X = btnCloseTime.Right + 1,
+ Y = 1,
+ Width = Application.GetRealWidth (320),
+ TextID = R.MyInternationalizationString.SAVE,
+ BackgroundColor = SkinStyle.Current.ViewColor,
+ TextAlignment = TextAlignment.Center,
+ TextColor = SkinStyle.Current.TextColor1,
+ };
+ bottomView.AddChidren (btnSaveTime);
+ btnSaveTime.MouseUpEventHandler += (sender3, e3) => {
+ btnTimelbl.Text = chooseTimeString;
+ dialog.Close ();
+ };
+
+ var nowDateTime = DateTime.Now;
+ var hour = nowDateTime.Hour;
+ //hourStr
+ var hourStr = hour.ToString();
+ if (hour < 10) {
+ hourStr = "0" + hour;
+ }
+
+ var minute = nowDateTime.Minute;
+ //minuteStr
+ var minuteStr = minute.ToString ();
+ if (minute < 10) {
+ minuteStr = "0" + minute;
+ }
+ var hourList = new List<string> ();
+ for (int i = 0; i < 24; i++) {
+ if (i < 10) {
+ var a = "0" + i.ToString ();
+ hourList.Add (a);
+ } else {
+ hourList.Add (i.ToString ());
+ }
+
+ }
+
+ var minuteList = new List<string> ();
+ for (int i = 0; i < 60; i++) {
+ if (i < 10) {
+ var a = "0" + i.ToString ();
+ minuteList.Add (a);
+ } else {
+ minuteList.Add (i.ToString ());
+ }
+
+ }
+
+ chooseTime.setNPicker (hourList, minuteList, null);
+ chooseTime.setCurrentItems (hour, minute, 0);
+ chooseTimeString = hourStr + ":" + minuteStr;
+
+ //string selectde = "";
+ chooseTime.OnSelectChangeEvent += (s1, s2, s3) => {
+ var hourV = hourList [s1];
+ var minuteV = minuteList [s2];
+ chooseTimeString = hourV + ":" + minuteV;
+
+ };
+
+ dialog.Show ();
+
+ }
+
/// <summary>
/// 鍔犺浇鎴块棿璁惧鍒楄〃鐣岄潰
/// </summary>
diff --git a/Crabtree/SmartHome/UI/SimpleControl/R.cs b/Crabtree/SmartHome/UI/SimpleControl/R.cs
index 84d984b..df420a9 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/R.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/R.cs
@@ -1204,7 +1204,10 @@
/// Do you want to synchronize all local devices and scenes to the cloud? This will be used for timer and alexa voice control functions.
/// </summary>
public const int DoYouWantToSynchronizeToTheCloud = 20061;
-
+ /// <summary>
+ /// Resend
+ /// </summary>
+ public const int Resend = 20062;
#endregion
}
}
\ No newline at end of file
--
Gitblit v1.8.0