| | |
| | | }; |
| | | //获取自动化列表 |
| | | GetLogicList(); |
| | | // 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像素 |
| | | vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12)}); |
| | | vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) }); |
| | | LogicView.SingleLogicView logicView = new LogicView.SingleLogicView(); |
| | | vv.AddChidren(logicView.FLayoutView()); |
| | | logicView.btnLogicName.Text = currLogic.name; |
| | |
| | | logicView.btnSwitchIcon.IsSelected = false; |
| | | currLogic.enable = "false"; |
| | | } |
| | | Send.switchLogic(currLogic); |
| | | Send.switchLogic(currLogic); |
| | | |
| | | }; |
| | | if (Logic.LogicList.Count-1==i) { |
| | | //if (i==0)降序排列 |
| | | if (Logic.LogicList.Count - 1 == i) |
| | | { |
| | | ///最后一个距离最底部12,界面显示效果作用; |
| | | vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) }); |
| | | } |
| | |
| | | List<string> logicIdList = new List<string>(); |
| | | //获取逻辑ID列表 |
| | | var idStr = Send.getLogicIdList(); |
| | | if (idStr.Code == "0" && idStr.Data != null) |
| | | if (idStr.Code == "0" && idStr.Data != null&& idStr.Data.ToString()!="") |
| | | { |
| | | var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data); |
| | | var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Date>>(date); |
| | |
| | | } |
| | | //获取自动化列表 |
| | | var logicStr = Send.getLogic(logicIdList); |
| | | if (logicStr.Code == "0" && logicStr.Data != null) |
| | | if (logicStr.Code == "0" && logicStr.Data != null && logicStr.Data.ToString() != "") |
| | | { |
| | | //获取逻辑详细返回是一个数组(object类型转换为数组); |
| | | var jArray = JArray.Parse(logicStr.Data.ToString()); |