From f4c86f68b900bd506ef7214b2ae9bd23a9d2ffa8 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期六, 19 十二月 2020 17:48:11 +0800
Subject: [PATCH] 完成筛选房间的功能

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 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 56cdcc9..9d37ba1
--- 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);
@@ -310,7 +310,7 @@
                 LogicMethod.dictionary(dic, "key", "timesection");
                 LogicMethod.dictionary(dic, "comparator", "=");
                 LogicMethod.dictionary(dic, "data_type", "string");
-                LogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "~" + btnEndTimeText.Text);
+                LogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text);
                 inputTime.condition.Add(dic);
                 if (edit)
                 {
@@ -344,8 +344,8 @@
                     foreach (var dic in dicList)
                     {
                         string value = dic["value"];
-                        string startTime = value.Split('~')[0];
-                        string endtTime = value.Split('~')[1];
+                        string startTime = value.Split('-')[0];
+                        string endtTime = value.Split('-')[1];
                         btnStartTimeText.Text = startTime;
                         btnStartTimeText.Tag = int.Parse(startTime.Split(':')[0]) * 60 + int.Parse(startTime.Split(':')[1]);
                         btnEndTimeText.Text = endtTime;
@@ -378,9 +378,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 +447,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