| | |
| | | { |
| | | case 0: |
| | | { |
| | | |
| | | |
| | | ////new一个新逻辑对象; |
| | | ////新增正常自动化入口 |
| | | //new一个新逻辑对象; |
| | | //新增正常自动化入口 |
| | | Common.Logic.CurrentLogic = new Common.Logic(); |
| | | Common.Logic.CurrentLogic.IsEnable = 1;//默认为开 |
| | | Common.Logic.CurrentLogic.LogicType = 0;//标记逻辑类型 |
| | |
| | | CommonPage.Loading.Start(); |
| | | try |
| | | { |
| | | if (!Config.Instance.Home.IsVirtually)//虚拟的不获取网关逻辑列表 |
| | | { |
| | | if (Common.Logic.LogicList.Count == 0) |
| | | { |
| | | var Idlist1 = await Send.GetLogicId(0);// |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var dd = e.Message; |
| | |
| | | /// <param name="refresview">Refresview.</param> |
| | | private static async void Automationview(VerticalRefreshLayout refresview, bool no) |
| | | { |
| | | |
| | | refresview.RemoveAll(); |
| | | if (Common.Logic.LogicList.Count == 0 && no == false) |
| | | { |
| | |
| | | logic.IsEnable = 0; |
| | | StatusColor(logic, logicRowlayout, 0); |
| | | } |
| | | if (!Config.Instance.Home.IsVirtually) |
| | | { |
| | | Send.LogicControlSwitch(logic); |
| | | } |
| | | //Logic.Send.AddModifyLogic(logic); |
| | | }; |
| | | if (logic.IsEnable == 1) |
| | |
| | | { |
| | | Common.Logic.LogicList.Remove(logic); |
| | | Automationview(refresview, no); |
| | | if (!Config.Instance.Home.IsVirtually) |
| | | { |
| | | Send.DelLogic(logic.LogicId); |
| | | } |
| | | }; |
| | | |
| | | }; |
| | |
| | | |
| | | } |
| | | } |
| | | |