wxr
2021-07-01 b409ece9569247d7e7b44fc15e8a02556ca05a57
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -142,6 +142,7 @@
            }
            else
            {
                var onePortAutomation = new OnePortAutomation();
                MainPage.BasePageView.AddChidren(onePortAutomation);
                onePortAutomation.Show();
@@ -278,7 +279,6 @@
                    var jay = jArray[a];
                    //数据返序列化为Logic对象
                    var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                    Console.WriteLine("获取逻辑==="+str);
                    var logic = Newtonsoft.Json.JsonConvert.DeserializeObject<Logic>(str);
                    if (logic != null)
                    {
@@ -316,6 +316,8 @@
                                }
                                newlogic.output.Add(logic.output[i]);
                            }
                            newlogic.noticeConfig = logic.noticeConfig;
                            newlogic.pushConfigs = logic.pushConfigs;
                            //添加逻辑
                            Logic.LogicList.Add(newlogic);
                        }
@@ -357,7 +359,8 @@
            //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;
                switch (int1)
@@ -372,6 +375,14 @@
                    case 3:
                        {
                            iconInt = 2;
                        }
                        break;
                    case 4:
                    case 6:
                    case 9:
                        {
                            iconInt = 3;
                        }
                        break;
@@ -466,6 +477,12 @@
                            strIcon = "LogicIcon/selectTheFun.png";
                        }
                        break;
                    case 3:
                        {
                            strIcon = "LogicIcon/shiwaitianqi.png";
                        }
                        break;
                    case 11:
                        {
                            //分割条件和目标的图标
@@ -494,7 +511,7 @@
            }
        }
        /// <summary>
        /// 判断网关类型
        /// 判断网关类型(0:bus网关;1:A协议网关)
        /// </summary>
        /// <returns></returns>
        public static bool IsGatewayType
@@ -504,13 +521,8 @@
                if (Entity.DB_ResidenceData.Instance.GatewayType == 1)
                {
                    return true;
                }
                else
                {
                    return false;
                }
                return false;
            }
        }
    }