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 | 49 +++++++++++++++++++++++++++++++++++-------------- 1 files changed, 35 insertions(+), 14 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..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; @@ -22,7 +26,7 @@ RemoveFromParent(); }; topView.topNameBtn.TextID = StringId.newAutomation; - + VerticalScrolViewLayout viewLayout = new VerticalScrolViewLayout { Y = Application.GetRealHeight(64), @@ -38,14 +42,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 +68,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 寰幆鏂瑰紡 @@ -84,7 +94,7 @@ ///閫夋嫨鍛ㄦ湡绫诲瀷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.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); //cyclicTitle.frameLayout.Radius = (uint)Application.GetRealHeight(12); cyclicTitle.btnText.TextID = StringId.days; viewLayout.AddChidren(cyclicTitle.FLayoutView()); @@ -96,12 +106,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 +121,19 @@ #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); + action(); + if (action != null) + { + action = null; + } + LogicMethod.RemoveAllView(); + + }; //saveView.frameLayout.Y = this.Height - saveView.frameLayout.Height; #endregion -- Gitblit v1.8.0