陈嘉乐
2020-11-26 5b40f1da1d28616de3880857b38357eef7859b64
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());
            ///输出各种动作的View
            LogicView.AddOutputInputView outputView = new LogicView.AddOutputInputView();
            viewLayout.AddChidren(outputView.FLayoutView());
            //目标处理方法
            InpOrOutLogicMethod.OutputTarget(this, viewLayout);
            ///添加图标的View
            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