| | |
| | | //区别不同设备,显示不同设备状态 |
| | | switch (device.functionType) |
| | | { |
| | | //开关灯光 light.Switch |
| | | case FunctionType.Dimmer: |
| | | case FunctionType.RGB: |
| | | case FunctionType.RGBW: |
| | | case FunctionType.CCT: |
| | | case FunctionType.Relay: |
| | | //窗帘 |
| | | case FunctionType.Curtain: |
| | | case FunctionType.RollerCurtain: |
| | | case FunctionType.TrietexCurtain: |
| | | //空调 |
| | | case FunctionType.AC: |
| | | //地热 |
| | | case FunctionType.FloorHeating: |
| | | {//开关灯 |
| | | foreach (var dic in dicList) |
| | | { |
| | |
| | | int indexVulae = int.Parse(inputView.btnClick.Tag.ToString()); |
| | | //标记编辑状态 |
| | | bool edit = true; |
| | | //表示是条件 |
| | | string if_type = LogicMethod.condition_if; |
| | | switch (button.Name) |
| | | { |
| | | case "1": |
| | |
| | | { |
| | | //用sid找到设备; |
| | | var device = LogicMethod.GetDevice(inputCondition.sid); |
| | | DeviceFunList deviceFunList = new DeviceFunList(); |
| | | ConditionDeviceFunList deviceFunList = new ConditionDeviceFunList(); |
| | | MainPage.BasePageView.AddChidren(deviceFunList); |
| | | deviceFunList.Show(device, indexVulae, edit, if_type); |
| | | deviceFunList.Show(device, indexVulae, edit); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | break; |
| | |
| | | int indexVulae = int.Parse(targetView.btnClick.Tag.ToString()); |
| | | //标记编辑状态 |
| | | bool edit = true; |
| | | //表示是目标 |
| | | string if_type = LogicMethod.target_if; |
| | | switch (button.Name) |
| | | { |
| | | case "1": |
| | | { |
| | | //用sid找到设备; |
| | | var device = LogicMethod.GetDevice(outputTarget.sid); |
| | | DeviceFunList deviceFunList = new DeviceFunList(); |
| | | TargetDeviceFunList deviceFunList = new TargetDeviceFunList(); |
| | | MainPage.BasePageView.AddChidren(deviceFunList); |
| | | deviceFunList.Show(device, indexVulae, edit, if_type); |
| | | deviceFunList.Show(device, indexVulae, edit); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | break; |