From c416268c4bb3ca958d8166542812a7e67517d858 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 18 十二月 2020 15:43:45 +0800
Subject: [PATCH] 2020-12-18-2

---
 HDL-ON_iOS/Resources/Language.ini                               |    9 ++
 HDL-ON_Android/Assets/Language.ini                              |    9 ++
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs             |   12 ++-
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs |   70 +++++++++++++++++++++++
 HDL_ON/Common/R.cs                                              |   11 +++
 .vs/HDL_APP_Project/xs/sqlite3/storage.ide                      |    0 
 HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs             |   20 +++++-
 .vs/HDL_APP_Project/xs/UserPrefs.xml                            |   25 +++++++-
 .vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal                  |    0 
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs            |    1 
 10 files changed, 142 insertions(+), 15 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 680c494..c359b99 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,16 +1,30 @@
 锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" />
-  <MonoDevelop.Ide.Workbench>
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs">
+    <Files>
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs" Line="156" Column="14" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/DateView.cs" Line="40" Column="12" />
+      <File FileName="HDL_ON/UI/CSS/CSS.cs" Line="62" Column="46" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs" Line="609" Column="15" />
+      <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="1" Column="1" />
+      <File FileName="HDL_ON/UI/UI0-Public/PublicAssmebly.cs" Line="384" Column="7" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs" Line="335" Column="21" />
+      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs" Line="106" Column="23" />
+    </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="HDL_APP_Project" expanded="True">
             <Node name="HDL_ON" expanded="True">
+              <Node name="Common" expanded="True" />
               <Node name="UI" expanded="True">
+                <Node name="CSS" expanded="True" />
+                <Node name="UI0-Public" expanded="True" />
                 <Node name="UI2" expanded="True">
                   <Node name="3-Intelligence" expanded="True">
                     <Node name="Automation" expanded="True">
-                      <Node name="AddLogic.cs" selected="True" />
+                      <Node name="LogicView" expanded="True" />
+                      <Node name="ConditionDeviceFunList.cs" selected="True" />
                     </Node>
                   </Node>
                   <Node name="FuntionControlView" expanded="True">
@@ -19,7 +33,12 @@
                 </Node>
               </Node>
             </Node>
-            <Node name="HDL-ON_Android" expanded="True" />
+            <Node name="HDL-ON_Android" expanded="True">
+              <Node name="Assets" expanded="True" />
+            </Node>
+            <Node name="HDL-ON_iOS" expanded="True">
+              <Node name="Resources" expanded="True" />
+            </Node>
           </Node>
         </State>
       </Pad>
diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
index 6533307..98a10be 100644
--- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
+++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
Binary files differ
diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
index b487236..b2205d4 100644
--- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
+++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
Binary files differ
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index b99ae7b..c2635c4 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -516,7 +516,14 @@
 7068=鏃堕棿
 7069=鏆傛湭璁剧疆鑷姩鍖栵紝璇峰墠寰�璁剧疆锛�
 7070=姝ゅ绌虹┖濡備篃~
-
+7071=寮�濮嬫椂闂存湭璁剧疆锛岃璁剧疆寮�濮嬫椂闂淬��
+7072=缁撴潫鏃堕棿鏈缃紝璇疯缃粨鏉熸椂闂淬��
+7073=寮�濮嬫椂闂村拰缁撴潫鏃堕棿涓嶈兘涓�鏍枫��
+7074=寮�濮嬫椂闂翠笉鑳藉ぇ浜庣粨鏉熸椂闂淬��
+7075=鏉′欢涓嶈兘涓虹┖銆�
+7076=鐩爣涓嶈兘涓虹┖銆�
+7077=鏃堕棿鏈缃紝璇疯缃椂闂淬��
+7078=鏉′欢鎴栬�呯洰鏍囦负绌恒��
 
 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index d1efffc..129d485 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -516,7 +516,14 @@
 7068=鏃堕棿
 7069=鏆傛湭璁剧疆鑷姩鍖栵紝璇峰墠寰�璁剧疆锛�
 7070=姝ゅ绌虹┖濡備篃~
-
+7071=寮�濮嬫椂闂存湭璁剧疆锛岃璁剧疆寮�濮嬫椂闂淬��
+7072=缁撴潫鏃堕棿鏈缃紝璇疯缃粨鏉熸椂闂淬��
+7073=寮�濮嬫椂闂村拰缁撴潫鏃堕棿涓嶈兘涓�鏍枫��
+7074=寮�濮嬫椂闂翠笉鑳藉ぇ浜庣粨鏉熸椂闂淬��
+7075=鏉′欢涓嶈兘涓虹┖銆�
+7076=鐩爣涓嶈兘涓虹┖銆�
+7077=鏃堕棿鏈缃紝璇疯缃椂闂淬��
+7078=鏉′欢鎴栬�呯洰鏍囦负绌恒��
 
 9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
 9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 21b6b36..ba1648b 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -510,7 +510,16 @@
         public const int timeMode = 7068;
         public const int logicnull = 7069;
         public const int secnenull = 7070;
-         
+        public const int setStartTime = 7071;
+        public const int setEndTime = 7072;
+        public const int unlikeTime = 7073;
+        public const int startTimeLessThanEndTime = 7074;
+        public const int conditioncNull = 7075;
+        public const int targetNull = 7076;
+        public const int timeNoSet = 7077;
+        public const int conditioncNullOrtargetNull = 7078;
+
+
 
 
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 62f95ea..3c54d9b 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -184,19 +184,21 @@
             ///淇濆瓨鐐瑰嚮浜嬩欢
             saveView.btnClick.MouseUpEventHandler += (sender, e) =>
             {
-
+                if (Logic.currlogic.input.Count == 0&& Logic.currlogic.output.Count == 0)
+                {
+                    new LogicView.TipPopView().TipBox(StringId.tip, StringId.conditioncNullOrtargetNull);
+                    return;
+                }
                 if (Logic.currlogic.input.Count == 0)
                 {
-                    new LogicView.TipPopView().FlashingBox("鏉′欢涓嶈兘涓虹┖");
+                    new LogicView.TipPopView().TipBox(StringId.tip, StringId.conditioncNull);
                     return;
                 }
                 if (Logic.currlogic.output.Count == 0)
                 {
-                    new LogicView.TipPopView().FlashingBox("鐩爣涓嶈兘涓虹┖");
+                    new LogicView.TipPopView().TipBox(StringId.tip, StringId.targetNull);
                     return;
                 }
-
-
                 Loading loading = new Loading();
                 this.AddChidren(loading);
                 HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs
index 20a1887..2d7fbb3 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs
@@ -201,6 +201,7 @@
             //纭鐐瑰嚮浜嬩欢
             view.btnConfirm.MouseUpEventHandler += (sender1, e1) =>
             {
+
                 if (sceneSelecetd == null)
                 {
                     //鎻愮ず锛氳繕娌¢�変腑鎵ц鍛ㄦ湡
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
index 48a954b..53bec95 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
@@ -575,5 +575,75 @@
         {
             new PublicAssmebly().TipMsgAutoClose(msg, false, 2000);
         }
+
+        /// <summary>
+        /// 閿欒淇℃伅鎻愮ず绐楀彛锛屾墜鍔ㄧ‘瀹氬叧闂�
+        /// </summary>
+        /// <param name="titleId">鏍囬鏂囨湰</param>
+        /// <param name="msgId">鎻愮ず閿欒鏂囨湰</param>
+        public void TipBox(int titleId, int msgId)
+        {
+            Dialog dialog = new Dialog()
+            {
+                BackgroundColor = CSS_Color.viewTrans60lucence,
+            };
+
+            FrameLayout contentView = new FrameLayout()
+            {
+                Gravity = Gravity.Center,
+                Width = Application.GetRealWidth(270),
+                Height = Application.GetRealHeight(140),
+                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(RradiusFrameLayout),
+            };
+            dialog.AddChidren(contentView);
+
+            Button btnTitle = new Button()
+            {
+                Y = Application.GetRealHeight(20),
+                Height = Application.GetRealHeight(22),
+                TextColor = CSS_Color.MainColor,
+                TextSize = LogicView.TextSize.text16,
+                TextAlignment = TextAlignment.Center,
+                TextID= titleId,
+            };
+            contentView.AddChidren(btnTitle);
+
+            Button btnMsg = new Button()
+            {
+                Height = Application.GetRealHeight(17),
+                Y = Application.GetRealHeight(50),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.TextualColor,
+                TextSize = LogicView.TextSize.text12,
+                TextID = msgId,
+            };
+            contentView.AddChidren(btnMsg);
+
+            Button btnLine = new Button()
+            {
+                Y = Application.GetRealHeight(96),
+                Height = Application.GetRealHeight(1),
+                BackgroundColor = CSS_Color.viewLine,
+            };
+            contentView.AddChidren(btnLine);
+
+            Button btnConfirm = new Button()
+            {
+                Y = btnLine.Bottom,
+                Height = Application.GetRealHeight(43),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.MainColor,
+                TextSize = TextSize.text16,
+                TextID = StringId.Close,
+            };
+            contentView.AddChidren(btnConfirm);
+            dialog.Show();
+            btnConfirm.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+
+        }
     }
 }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
index 9d37ba1..edf6086 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
@@ -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;
                 }
 

--
Gitblit v1.8.0