陈嘉乐
2020-12-10 9f47eb8beda408a0bcf616dcd0dddc0067782974
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -23,7 +23,7 @@
             {
                 RemoveFromParent();
             };
            if (string.IsNullOrEmpty(Logic.currlogic.sid))
            if (string.IsNullOrEmpty(Logic.currlogic.userLogicId))
            {
                topView.topNameBtn.TextID = StringId.newAutomation;
                topView.setBtn.Visible = false;
@@ -124,7 +124,7 @@
            LogicView.LogicTypeTitleView cyclicTitle = new LogicView.LogicTypeTitleView();
            cyclicTitle.frameLayout.Height = Application.GetRealHeight(50);
            cyclicTitle.frameLayout.Radius = (uint)Application.GetRealHeight(12);
            cyclicTitle.btnText.TextID = StringId.days;
            cyclicTitle.btnText.Text = MainView.GetWeekText(Logic.currlogic);
            viewLayout.AddChidren(cyclicTitle.FLayoutView());
            cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) =>
            {
@@ -140,8 +140,8 @@
            #endregion
            #region  执行推送 发送通知
            /////上下间隔12像素
            //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
            ///上下间隔12像素
            viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
            /////执行推送iew
            //LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
            //push.frameLayout.Height = Application.GetRealHeight(50);
@@ -169,7 +169,7 @@
            this.AddChidren(saveView.FLayoutView());
            saveView.btnClick.MouseUpEventHandler += (sender, e) =>
            {
                if (string.IsNullOrEmpty(Logic.currlogic.sid))
                if (string.IsNullOrEmpty(Logic.currlogic.userLogicId))
                {
                    List<string> list = new List<string>();
                    foreach (var logic in Logic.LogicList)
@@ -232,7 +232,7 @@
            //定义一个局部变量记录选中文本状态
            string weekName = "";
            //定义一个局部Btn用来记录选中Btn;
            var selecetdBtn = new Button();
            var selecetdBtn = new Button() { Text=""};
            for (int i = 0; i < 4; i++)
            {
                LogicView.SelectTypeView dateTypeView = new LogicView.SelectTypeView();
@@ -320,35 +320,31 @@
                {
                    dateTypeView.btnText.TextColor = CSS.CSS_Color.textConfirmColor;
                    selecetdBtn = dateTypeView.btnText;
                }
                else if (button.Text == weekName)
                {
                    dateTypeView.btnText.TextColor = CSS.CSS_Color.textConfirmColor;
                    selecetdBtn = dateTypeView.btnText;
                }
            }
            //确定保存
            dateView.btnConfirm.MouseUpEventHandler += (sender3, e3) =>
            {
                if (weekName == Language.StringByID(StringId.monthly)|| weekName== Language.StringByID(StringId.weekly)) {
                if (selecetdBtn.Text == Language.StringByID(StringId.monthly)|| selecetdBtn.Text == Language.StringByID(StringId.weekly)) {
                    //提示:还未选
                    return;
                }
                if (weekName == Language.StringByID(StringId.performA))
                if (selecetdBtn.Text == Language.StringByID(StringId.performA))
                {
                    //执行一次
                    Logic.currlogic.cycle.type = "once";
                }
                else if (weekName == Language.StringByID(StringId.days))
                else if (selecetdBtn.Text == Language.StringByID(StringId.days))
                {
                    //每天
                    Logic.currlogic.cycle.type = "day";
                }
                //选中保存之后显示文本
                button.Text = weekName;
                button.Text = selecetdBtn.Text;
                //移除fLayout界面
                fLayout.RemoveFromParent();
            };
@@ -387,8 +383,8 @@
                weekTypeView.btnLine.X = Application.GetRealWidth(20);
                weekTypeView.btnLine.Width = Application.GetRealWidth(303);
                weekTypeView.btnNextIcon.X = Application.GetRealWidth(303);
                weekTypeView.btnNextIcon.Width = Application.GetMinRealAverage(28);
                weekTypeView.btnNextIcon.Height = Application.GetMinRealAverage(28);
                weekTypeView.btnNextIcon.Width = Application.GetRealWidth(28);
                weekTypeView.btnNextIcon.Height = Application.GetRealWidth(28);
                weekTypeView.btnNextIcon.UnSelectedImagePath = "LogicIcon/weekoff.png";
                weekTypeView.btnNextIcon.SelectedImagePath = "LogicIcon/weekon.png";
                weekView.frameLayout.AddChidren(weekTypeView.FLayoutView());
@@ -604,8 +600,8 @@
            andConditionViews.btnLine.X = Application.GetRealWidth(20);
            andConditionViews.btnLine.Width = Application.GetRealWidth(303);
            andConditionViews.btnNextIcon.X = Application.GetRealWidth(303);
            andConditionViews.btnNextIcon.Width = Application.GetMinRealAverage(28);
            andConditionViews.btnNextIcon.Height = Application.GetMinRealAverage(28);
            andConditionViews.btnNextIcon.Width = Application.GetRealWidth(28);
            andConditionViews.btnNextIcon.Height = Application.GetRealWidth(28);
            andConditionViews.btnNextIcon.UnSelectedImagePath = "LogicIcon/weekoff.png";
            andConditionViews.btnNextIcon.SelectedImagePath = "LogicIcon/weekon.png";
            meetTheConditionView.frameLayout.AddChidren(andConditionViews.FLayoutView());
@@ -620,8 +616,8 @@
            orConditionView.btnLine.X = Application.GetRealWidth(20);
            orConditionView.btnLine.Width = Application.GetRealWidth(303);
            orConditionView.btnNextIcon.X = Application.GetRealWidth(303);
            orConditionView.btnNextIcon.Width = Application.GetMinRealAverage(28);
            orConditionView.btnNextIcon.Height = Application.GetMinRealAverage(28);
            orConditionView.btnNextIcon.Width = Application.GetRealWidth(28);
            orConditionView.btnNextIcon.Height = Application.GetRealWidth(28);
            orConditionView.btnNextIcon.UnSelectedImagePath = "LogicIcon/weekoff.png";
            orConditionView.btnNextIcon.SelectedImagePath = "LogicIcon/weekon.png";
            meetTheConditionView.frameLayout.AddChidren(orConditionView.FLayoutView());