wei
2020-12-18 d53f7315de145266e6465d9f95d11d1712b9a91b
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
old mode 100644 new mode 100755
@@ -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);
            }
@@ -199,7 +209,6 @@
            }
            return weekTextName.TrimEnd(',');
        }
        /// <summary>
        /// 获取每月的字符串