| | |
| | | /// </summary> |
| | | public bool Lighting = false; |
| | | |
| | | |
| | | |
| | | public ClothesHangerControl(string iconPath1, string iconPath2, string title, string time) |
| | | { |
| | | btnIcon = new Button() |
| | |
| | | btnTime = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = btnTitle.Bottom, |
| | | Y = Application.GetRealHeight(74-32), |
| | | Height = Application.GetRealHeight(32), |
| | | Text = time, |
| | | TextColor = 0x00000000, |
| | |
| | | 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 }; |