From 263401d40b2d9d2c1b36a24f33d45c5cb7192518 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 23 十二月 2020 15:51:54 +0800
Subject: [PATCH] 20201223-6

---
 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