JLChen
2020-12-23 320d7cc8feb394d0ce3db2ec1d01593b554d990f
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -34,8 +34,8 @@
            };
            //获取自动化列表
            GetLogicList();
            // for (int i = Logic.LogicList.Count-1; i >= 0; i--)降序排列
            for (int i = 0; i < Logic.LogicList.Count; i++)
             for (int i = Logic.LogicList.Count-1; i >= 0; i--)//降序排列
            //for (int i = 0; i < Logic.LogicList.Count; i++)
            {
                var currLogic = Logic.LogicList[i];
                ///上下间隔12像素
@@ -52,6 +52,7 @@
                    addLogic.Show();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                };
                //开关图标的点击事件
                logicView.btnSwitchIcon.MouseUpEventHandler += (sender1, e1) =>
                {
                    logicView.btnSwitchIcon.IsSelected = !logicView.btnSwitchIcon.IsSelected;
@@ -59,20 +60,29 @@
                    {
                        logicView.btnSwitchIcon.IsSelected = true;
                        currLogic.enable = "true";
                    }
                    else
                    {
                        logicView.btnSwitchIcon.IsSelected = false;
                        currLogic.enable = "false";
                    }
                    Send.switchLogic(currLogic);
                    //Send.switchLogic(currLogic);
                    new System.Threading.Thread(() =>
                    {
                        try
                        {
                            //逻辑使能的命令
                            Send.switchLogic(currLogic);
                        }
                        catch { }
                    })
                    { IsBackground = true }.Start();
                };
                GetSelectIcon(logicView.frameLayout, currLogic);
                //if (i==0)降序排列
                if (Logic.LogicList.Count - 1 == i)
                if (i==0)//降序排列
                //if (Logic.LogicList.Count - 1 == i)
                {
                    ///最后一个距离最底部12,界面显示效果作用;
                    vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
@@ -100,12 +110,12 @@
                automationPage.AddChidren(btnTipNot);
                Button btnTipNotText = new Button()
                {
                    Y = btnTipNot.Bottom,
                    Height = Application.GetRealWidth(100),
                    TextID = StringId.ContentIsEmpty,
                    Y = btnTipNot.Bottom + Application.GetRealHeight(16),
                    Height = Application.GetRealHeight(20),
                    TextID = StringId.logicnull,
                    TextAlignment = TextAlignment.Center,
                    TextColor = CSS.CSS_Color.TextualColor,
                    TextSize = CSS.CSS_FontSize.PromptFontSize_FirstLevel,
                    TextSize = LogicView.TextSize.text14,
                    TextColor = CSS.CSS_Color.textConfirmColor,
                };
                automationPage.AddChidren(btnTipNotText);
            }
@@ -200,7 +210,6 @@
            return weekTextName.TrimEnd(',');
        }
        /// <summary>
        /// 获取每月的字符串
        /// </summary>
@@ -222,9 +231,8 @@
        /// <summary>
        /// 获取逻辑列表
        /// </summary>
        private static void GetLogicList()
        public static void GetLogicList()
        {
            if (Logic.LogicList.Count != 0)
            {
                //自动化列表为0才去获取自动化列表;