From 9118585babf132b7e8a7a93da8c6ebf79510b72c Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 26 十一月 2020 20:21:20 +0800
Subject: [PATCH] 2020-11-26-2

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs |   68 ++++++++++++++++++++++++++--------
 1 files changed, 52 insertions(+), 16 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 5f03fd0..232f022 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -11,7 +11,7 @@
         {
             Tag = "Logic";
         }
-
+        
         public void Show()
         {
             this.BackgroundColor = CSS.CSS_Color.viewMiddle;
@@ -22,7 +22,7 @@
                  RemoveFromParent();
              };
             topView.topNameBtn.TextID = StringId.newAutomation;
-
+            
             VerticalScrolViewLayout viewLayout = new VerticalScrolViewLayout
             {
                 Y = Application.GetRealHeight(64),
@@ -38,14 +38,14 @@
             viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12));
             ///婊¤冻浠ヤ笅鏉′欢鐨刅iew
             LogicView.LogicTypeTitleView titleCondition = new LogicView.LogicTypeTitleView();
-            titleCondition.frameLayout.SetCornerWithSameRadius(12, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            titleCondition.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
             titleCondition.btnText.TextID = StringId.whenTheFollowingConditionsAreMet;
             viewLayout.AddChidren(titleCondition.FLayoutView());
-            // 杈撳叆鏉′欢澶勭悊鏂规硶
+            // 鏉′欢澶勭悊鏂规硶
             InpOrOutLogicMethod.InputCondition(this, viewLayout);
             ///娣诲姞鍥炬爣鐨刅iew
             LogicView.LogicAddView addInputIcon = new LogicView.LogicAddView();
-            addInputIcon.frameLayout.SetCornerWithSameRadius(12, HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            addInputIcon.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
             viewLayout.AddChidren(addInputIcon.FLayoutView());
 
             addInputIcon.btnClick.MouseUpEventHandler += (sen, e) =>
@@ -64,16 +64,22 @@
             viewLayout.AddChidren(addOutpuTextView.FLayoutView(54, 20));
             ///浠ヤ笅鍔ㄤ綔View        
             LogicView.LogicTypeTitleView titleOutpu = new LogicView.LogicTypeTitleView();
-            titleOutpu.frameLayout.SetCornerWithSameRadius(12, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            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(12, HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            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  寰幆鏂瑰紡
@@ -83,11 +89,34 @@
             viewLayout.AddChidren(cyclicTextView.FLayoutView(54, 20));
             ///閫夋嫨鍛ㄦ湡绫诲瀷View        
             LogicView.LogicTypeTitleView cyclicTitle = new LogicView.LogicTypeTitleView();
-            cyclicTextView.frameLayout.Height = Application.GetRealHeight(50);
-            cyclicTitle.frameLayout.SetCornerWithSameRadius(12, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
-            //cyclicTitle.frameLayout.Radius = (uint)Application.GetRealHeight(12);
+            cyclicTitle.frameLayout.Height = Application.GetRealHeight(50);
+            cyclicTitle.frameLayout.Radius = (uint)Application.GetRealHeight(12);
             cyclicTitle.btnText.TextID = StringId.days;
             viewLayout.AddChidren(cyclicTitle.FLayoutView());
+            cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) =>
+            {
+                FrameLayout fLayout = new FrameLayout
+                {
+                    BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
+                };
+                this.AddChidren(fLayout);
+                LogicView.DateView dateView = new LogicView.DateView();
+                dateView.FLayoutView(fLayout, 7);
+                dateView.btnCancel.MouseUpEventHandler += (sender2, e2) =>
+                {
+                    //绉婚櫎fLayout鐣岄潰
+                    fLayout.RemoveFromParent();
+                };
+                for (int i = 0; i < 7; i++) {
+                    LogicView.SelectTypeView dateTypeView = new LogicView.SelectTypeView();
+                    dateTypeView.frameLayout.Y = Application.GetRealHeight(56 + 50 * i);
+                    dateTypeView.btnIcon.Visible = false;
+                    dateTypeView.btnText.X = Application.GetRealWidth(20);
+                    dateTypeView.btnText.TextID = StringId.time;
+                    dateTypeView.btnNextIcon.X = Application.GetRealWidth(307);
+                    dateView.AddChidren(dateTypeView.FLayoutView());
+                }
+            };
             #endregion
 
             #region  鎵ц鎺ㄩ�� 鍙戦�侀�氱煡
@@ -96,12 +125,12 @@
             ///鎵ц鎺ㄩ�乮ew
             LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
             push.frameLayout.Height = Application.GetRealHeight(50);
-            push.frameLayout.SetCornerWithSameRadius(12, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
             push.btnText.TextID = StringId.push;
             viewLayout.AddChidren(push.FLayoutView());
             ///鍙戦�侀�氱煡View        
             LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
-            notification.frameLayout.SetCornerWithSameRadius(12, HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
             notification.btnText.TextID = StringId.notification;
             viewLayout.AddChidren(notification.FLayoutView());
             ///涓婁笅闂撮殧62鍍忕礌
@@ -111,8 +140,15 @@
             #region  淇濆瓨
             ///淇濆瓨View
             LogicView.SaveView saveView = new LogicView.SaveView();
-            saveView.frameLayout.SetCornerWithSameRadius(24, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
             this.AddChidren(saveView.FLayoutView());
+            saveView.btnClick.MouseUpEventHandler += (sender, e) =>
+            {
+                Logic.LogicList.Add(Logic.currlogic);
+                LogicMethod.RemoveAllView();
+                MainView.MainShow();
+                
+            };
             //saveView.frameLayout.Y = this.Height - saveView.frameLayout.Height;
             #endregion
 

--
Gitblit v1.8.0