From f345087dbefecef9146fdb13481cb9ee3320d576 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 23 十二月 2020 11:46:28 +0800
Subject: [PATCH] 20201223-2
---
HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs | 40 ++++++++++++++++++++++++++--------------
1 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
old mode 100644
new mode 100755
index 062a3dd..edf6086
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
@@ -107,9 +107,9 @@
var systeMinute = DateTime.Now.Minute;//鑾峰彇鍒嗛挓
int systemHourIndex = 0;
int systeMinuteIndex = 0;
- for (int i = 0; i < timePointView.GethIntList0().Count; i++)
+ for (int i = 0; i < timePointView.GethIntList().Count; i++)
{
- var currhour = timePointView.GethIntList0()[i];
+ var currhour = timePointView.GethIntList()[i];
if (systemHour == currhour)
{
systemHourIndex = i;
@@ -160,7 +160,7 @@
int hIndex = timePointView.GetValueIndex(timeValue, 0, 1, timePointView.GethIntList());
int mIndex = timePointView.GetValueIndex(timeValue, 1, 0, timePointView.GetmIntList());
//鏇存柊鍒濆鐘舵��
- timePointView.mUIPickerView.setCurrentItems(hIndex - 1, mIndex, 0);
+ timePointView.mUIPickerView.setCurrentItems(hIndex, mIndex, 0);
timepoint = timeValue;
}
}
@@ -230,11 +230,11 @@
Button btnStartTimeText = new Button
{
TextSize = LogicView.TextSize.text12,
- Width = Application.GetRealWidth(32 + 3),
+ Width = Application.GetRealWidth(32 + 3+20),
Height = Application.GetRealHeight(17),
TextColor = CSS.CSS_Color.textCancelColor,
Y = Application.GetRealHeight(17),
- X = Application.GetRealWidth(260),
+ X = Application.GetRealWidth(260-20),
Tag = "0",
};
startTimeView.frameLayout.AddChidren(btnStartTimeText);
@@ -253,11 +253,11 @@
Button btnEndTimeText = new Button
{
TextSize = LogicView.TextSize.text12,
- Width = Application.GetRealWidth(32 + 3),
+ Width = Application.GetRealWidth(32 + 3+20),
Height = Application.GetRealHeight(17),
TextColor = CSS.CSS_Color.textCancelColor,
Y = Application.GetRealHeight(17),
- X = Application.GetRealWidth(260),
+ X = Application.GetRealWidth(260-20),
Tag = "0",
};
endTimeView.frameLayout.AddChidren(btnEndTimeText);
@@ -282,24 +282,36 @@
//纭畾鐐瑰嚮浜嬩欢
timeHorizonView.btnConfirm.MouseUpEventHandler += (sender, e) =>
{
+
+ if (btnStartTimeText.Tag.ToString() == "0"&& btnEndTimeText.Tag.ToString() == "0")
+ {
+ //鎻愮ず锛氭椂闂存湭璁剧疆锛岃璁剧疆鏃堕棿銆�
+ new LogicView.TipPopView().TipBox(StringId.tip, StringId.timeNoSet);
+ return;
+ }
+
if (btnStartTimeText.Tag.ToString() == "0")
{
- //鎻愮ず锛氳閫変腑寮�濮嬫椂闂�
+ //鎻愮ず锛氬紑濮嬫椂闂存湭璁剧疆锛岃璁剧疆寮�濮嬫椂闂淬��
+ new LogicView.TipPopView().TipBox(StringId.tip,StringId.setStartTime);
return;
}
if (btnEndTimeText.Tag.ToString() == "0")
{
- //鎻愮ず锛氳閫変腑缁撴潫鏃堕棿
+ //鎻愮ず锛氱粨鏉熸椂闂存湭璁剧疆锛岃璁剧疆缁撴潫鏃堕棿銆�
+ new LogicView.TipPopView().TipBox(StringId.tip, StringId.setEndTime);
return;
}
if (btnStartTimeText.Tag.ToString() == btnEndTimeText.Tag.ToString())
{
- //鎻愮ず锛氭椂闂翠竴鏍风殑
+ //鎻愮ず锛氬紑濮嬫椂闂村拰缁撴潫鏃堕棿涓嶈兘涓�鏍枫��
+ new LogicView.TipPopView().TipBox(StringId.tip, StringId.unlikeTime);
return;
}
if (int.Parse(btnStartTimeText.Tag.ToString()) > int.Parse(btnEndTimeText.Tag.ToString()))
{
- //鎻愮ず锛氬紑濮嬫椂闂翠笉鑳藉ぇ浜庣粨鏉熸椂闂�
+ //鎻愮ず锛氬紑濮嬫椂闂翠笉鑳藉ぇ浜庣粨鏉熸椂闂淬��
+ new LogicView.TipPopView().TipBox(StringId.tip, StringId.startTimeLessThanEndTime);
return;
}
@@ -378,9 +390,9 @@
var systeMinute = DateTime.Now.Minute;//鑾峰彇鍒嗛挓
int systemHourIndex = 0;
int systeMinuteIndex = 0;
- for (int i = 0; i < timePointView.GethIntList0().Count; i++)
+ for (int i = 0; i < timePointView.GethIntList().Count; i++)
{
- var currhour = timePointView.GethIntList0()[i];
+ var currhour = timePointView.GethIntList()[i];
if (systemHour == currhour)
{
systemHourIndex = i;
@@ -447,7 +459,7 @@
int hourIndex = timePointView.GetValueIndex(timepoint, 0, 1, timePointView.GethIntList());
int minuteIndex = timePointView.GetValueIndex(timepoint, 1, 0, timePointView.GetmIntList());
//鏇存柊鐘舵��
- timePointView.mUIPickerView.setCurrentItems(hourIndex - 1, minuteIndex, 0);
+ timePointView.mUIPickerView.setCurrentItems(hourIndex, minuteIndex, 0);
}
//閫変腑鏃堕棿鍥炶皟鏂规硶,鏃堕棿鍙樺寲涓�娆″洖璋冧竴娆�
--
Gitblit v1.8.0