From f25c6122eb7e26be5e7f036cf29b9019c4953be2 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 21 十二月 2020 19:44:02 +0800
Subject: [PATCH] Merge branch 'WJC' into NewFilePath
---
HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 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 9727a29..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;
}
}
@@ -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