| | |
| | | /// </summary> |
| | | /// <param name="thisView">当前界面</param> |
| | | /// <param name="viewLayout">上下滑动控件</param> |
| | | public static void InputCondition(FrameLayout thisView,VerticalScrolViewLayout viewLayout) |
| | | public static void InputCondition(FrameLayout thisView, VerticalScrolViewLayout viewLayout) |
| | | { |
| | | for (int i = 0; i < Logic.currlogic.input.Count; i++) |
| | | { |
| | | Input inputCondition = Logic.currlogic.input[i]; |
| | | ///各种条件的View |
| | | LogicView.AddOutputInputView inputView = new LogicView.AddOutputInputView(); |
| | | viewLayout.AddChidren(inputView.FLayoutView()); |
| | | inputView.FLayoutView(viewLayout); |
| | | ///记录条件类型 |
| | | inputView.btnClick.Name = inputCondition.condition_type; |
| | | ///记录条件索引 |
| | |
| | | inputView.btnText.Text = Language.StringByID(StringId.hour) + ": " + value; |
| | | inputView.btnClick.AddTag("timepoint", value); |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case "2": |
| | |
| | | {//开关灯 |
| | | foreach (var dic in dicList) |
| | | { |
| | | |
| | | |
| | | string value = dic["value"]; |
| | | if (value == "on") |
| | | { |
| | |
| | | var device = LogicMethod.GetDevice(inputCondition.sid); |
| | | DeviceFunList deviceFunList = new DeviceFunList(); |
| | | MainPage.BasePageView.AddChidren(deviceFunList); |
| | | deviceFunList.Show(device, indexVulae,edit, if_type); |
| | | deviceFunList.Show(device, indexVulae, edit, if_type); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | break; |
| | | |
| | | |
| | | |
| | | } |
| | | }; |
| | | ///删除控件 |
| | | inputView.btnDel.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | Logic.currlogic.input.Remove(inputCondition); |
| | | inputView.frameLayout.RemoveFromParent(); |
| | | }; |
| | | } |
| | | |
| | |
| | | Output outputTarget = Logic.currlogic.output[i]; |
| | | ///各种条件的View |
| | | LogicView.AddOutputInputView targetView = new LogicView.AddOutputInputView(); |
| | | viewLayout.AddChidren(targetView.FLayoutView()); |
| | | targetView.FLayoutView(viewLayout); |
| | | ///记录条件类型 |
| | | targetView.btnClick.Name = outputTarget.target_type; |
| | | ///记录条件索引 |
| | |
| | | break; |
| | | } |
| | | }; |
| | | ///删除控件 |
| | | targetView.btnDel.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | Logic.currlogic.output.Remove(outputTarget); |
| | | targetView.frameLayout.RemoveFromParent(); |
| | | }; |
| | | } |
| | | } |
| | | |