wei
2020-12-23 263401d40b2d9d2c1b36a24f33d45c5cb7192518
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -43,7 +43,7 @@
                LogicView.SingleLogicView logicView = new LogicView.SingleLogicView();
                vv.AddChidren(logicView.FLayoutView());
                logicView.btnLogicName.Text = currLogic.name;
                logicView.btnWeekText.Text = GetWeekText(currLogic);
                logicView.btnWeekText.Text = GetCyclicText(currLogic);
                logicView.btnclick.MouseUpEventHandler += (sen, e) =>
                {
                    Logic.currlogic = currLogic;
@@ -72,7 +72,7 @@
                        try
                        {
                            //逻辑使能的命令
                            Send.switchLogic(currLogic);
                            Send.SwitchLogic(currLogic);
                        }
                        catch { }
@@ -135,7 +135,7 @@
        ///返回循环描述文本
        /// </summary>
        /// <param name="logic"></param>
        public static string GetWeekText(Logic logic)
        public static string GetCyclicText(Logic logic)
        {
            string weekName = "";
@@ -168,7 +168,7 @@
            return weekName;
        }
        /// <summary>
        /// 获取星期的字符串
        /// 返回星期描述文本
        /// </summary>
        /// <param name="weekList"></param>
        /// <returns></returns>
@@ -233,7 +233,6 @@
        /// </summary>
        public static void GetLogicList()
        {
            if (Logic.LogicList.Count != 0)
            {
                //自动化列表为0才去获取自动化列表;
@@ -241,7 +240,7 @@
            }
            List<string> logicIdList = new List<string>();
            //获取逻辑ID列表
            var idStr = Send.getLogicIdList();
            var idStr = Send.GetLogicIdList();
            if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "")
            {
                var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data);
@@ -253,7 +252,7 @@
                }
            }
            //获取自动化列表
            var logicStr = Send.getLogic(logicIdList);
            var logicStr = Send.GetLogic(logicIdList);
            if (logicStr.Code == "0" && logicStr.Data != null && logicStr.Data.ToString() != "")
            {
                //获取逻辑详细返回是一个数组(object类型转换为数组);
@@ -312,6 +311,12 @@
            //2-功能图标
            for (int i = 0; i < logic.input.Count; i++)
            {
                if (logic.input[i] == null)
                {
                    //防止有的空对象;
                    //正常情况下不会该现象;
                    continue;
                }
                var int1 = int.Parse(logic.input[i].condition_type);
                int iconInt = 0;
@@ -348,6 +353,12 @@
            //14-延时图标
            for (int i = 0; i < logic.output.Count; i++)
            {
                if (logic.output[i] == null)
                {
                    //防止有的空对象;
                    //正常情况下不会该现象;
                    continue;
                }
                var int1 = int.Parse(logic.output[i].target_type);
                int iconInt = 0;
                switch (int1)