| | |
| | | { |
| | | //群控 |
| | | case SPK.GroupControl: |
| | | int bottom = 50; |
| | | int height = Application.GetRealHeight(50); |
| | | int attributesNameId=0; |
| | | int count = 0; |
| | | foreach (var attr in (device as GroupControl).attributes) |
| | |
| | | { |
| | | LogicView.FunTypeView view = new LogicView.FunTypeView(); |
| | | view.btnState.Name = "群控"; |
| | | view.frameLayout.Y = count * Application.GetRealHeight(50); |
| | | view.frameLayout.Y = count * height; |
| | | fLayout.AddChidren(view.FLayoutView()); |
| | | count++; |
| | | switch (attr.key) |
| | |
| | | break; |
| | | case FunctionAttributeKey.Colorful: |
| | | attributesNameId = StringId.ColorfulFunction; |
| | | view.btnState.Name = "colorful"; |
| | | ///开关点击事件 |
| | | view.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditDeviceState(device, index, view.btnState, null, null, null); |
| | | GetEditDeviceState(device, index, view.btnState, null, null, null, attr.key); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //设备延时iewv |
| | | DelayView(fLayout, Application.GetRealHeight(50)* count); |
| | | DelayView(fLayout, height* count); |
| | | break; |
| | | //插座(有USB) |
| | | case SPK.PanelSocket: |
| | |
| | | break; |
| | | case SPK.GroupControl: |
| | | { |
| | | if (button.Name == "colorful") |
| | | { |
| | | keyVlaue = "colorful"; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | } |
| | |
| | | /// <param name="button2">显示Btn</param> |
| | | /// <param name="button3">显示Btn</param> |
| | | /// <param name="button4">显示Btn</param> |
| | | private void GetEditDeviceState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4) |
| | | /// <param name="attribute">属性key</param> |
| | | private void GetEditDeviceState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4, string attribute="") |
| | | { |
| | | Output outputs = Logic.currlogic.output[index]; |
| | | var dicList = outputs.status; |
| | |
| | | this.btnDelay.Text = outputs.delay + "s"; |
| | | this.strdelay = outputs.delay; |
| | | } |
| | | InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4); |
| | | InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4, attribute); |
| | | } |
| | | /// <summary> |
| | | /// 添加选中数据 |