| | |
| | | inputView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(device.functionType); |
| | | //显示设备名称 |
| | | inputView.btnText.Text = device.name; |
| | | //改变设备名称宽度 |
| | | //改变设备名称显示控件宽度 |
| | | inputView.btnText.Width = Application.GetRealWidth(80); |
| | | //区别不同设备,显示不同设备状态 |
| | | switch (device.functionType) |
| | |
| | | inputView.btnClick.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | Button button = (Button)sen; |
| | | //找到当前编辑的索引 |
| | | int indexVulae = int.Parse(inputView.btnClick.Tag.ToString()); |
| | | //标记编辑状态 |
| | | bool edit = true; |
| | | switch (button.Name) |
| | | { |
| | | case "1": |
| | |
| | | }; |
| | | thisView.AddChidren(fLayout); |
| | | TimeTpye timeTpye = new TimeTpye(); |
| | | timeTpye.TimePoint(fLayout, true, int.Parse(inputView.btnClick.Tag.ToString())); |
| | | timeTpye.TimePoint(fLayout, edit, indexVulae); |
| | | } |
| | | break; |
| | | case "2": |
| | |
| | | }; |
| | | thisView.AddChidren(fLayout); |
| | | TimeTpye timeTpye = new TimeTpye(); |
| | | timeTpye.TimeHorizon(fLayout, true, int.Parse(inputView.btnClick.Tag.ToString())); |
| | | timeTpye.TimeHorizon(fLayout, edit, indexVulae); |
| | | } |
| | | break; |
| | | |
| | | case "3": |
| | | { |
| | | //用sid找到设备; |
| | | var device = LogicMethod.GetDevice(inputCondition.sid); |
| | | DeviceFunList deviceFunList = new DeviceFunList(); |
| | | MainPage.BasePageView.AddChidren(deviceFunList); |
| | | deviceFunList.Show(device, indexVulae,edit); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | }; |
| | | } |