From 5b40f1da1d28616de3880857b38357eef7859b64 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 26 十一月 2020 17:51:35 +0800
Subject: [PATCH] 2020-11-26-1

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 554c377..d9c4b1d 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -11,7 +11,11 @@
         {
             Tag = "Logic";
         }
-
+        /// <summary>
+        /// 琛ㄧず杩斿洖鏇存柊鐣岄潰
+        /// (瀹氫箟闈欐�佹槸鍥犱负璇ョ晫闈細琚叾瀹冪晫闈㈢Щ闄わ紝杩斿洖鏃朵細鍑虹幇action绌哄紓甯�)
+        /// </summary>
+        public static Action action;
         public void Show()
         {
             this.BackgroundColor = CSS.CSS_Color.viewMiddle;
@@ -67,13 +71,19 @@
             titleOutpu.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
             titleOutpu.btnText.TextID = StringId.theFollowingActions;
             viewLayout.AddChidren(titleOutpu.FLayoutView());
-            ///杈撳嚭鍚勭鍔ㄤ綔鐨刅iew
-            LogicView.AddOutputInputView outputView = new LogicView.AddOutputInputView();
-            viewLayout.AddChidren(outputView.FLayoutView());
+            //鐩爣澶勭悊鏂规硶
+            InpOrOutLogicMethod.OutputTarget(this, viewLayout);
             ///娣诲姞鍥炬爣鐨刅iew
             LogicView.LogicAddView addOutputIcon = new LogicView.LogicAddView();
             addOutputIcon.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
             viewLayout.AddChidren(addOutputIcon.FLayoutView());
+            addOutputIcon.btnClick.MouseUpEventHandler += (sen, e) =>
+            {
+                var addTarget = new AddTarget();
+                MainPage.BasePageView.AddChidren(addTarget);
+                addTarget.Show();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            };
             #endregion
 
             #region  寰幆鏂瑰紡
@@ -113,6 +123,17 @@
             LogicView.SaveView saveView = new LogicView.SaveView();
             saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
             this.AddChidren(saveView.FLayoutView());
+            saveView.btnClick.MouseUpEventHandler += (sender, e) =>
+            {
+                Logic.LogicList.Add(Logic.currlogic);
+                action();
+                if (action != null)
+                {
+                    action = null;
+                }
+                LogicMethod.RemoveAllView();
+                
+            };
             //saveView.frameLayout.Y = this.Height - saveView.frameLayout.Height;
             #endregion
 

--
Gitblit v1.8.0