陈嘉乐
2020-11-25 1410e38e50687272a162123552de122661d981ee
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -59,7 +59,7 @@
                            inputView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(device.functionType);
                            //显示设备名称
                            inputView.btnText.Text = device.name;
                            //改变设备名称宽度
                            //改变设备名称显示控件宽度
                            inputView.btnText.Width = Application.GetRealWidth(80);
                            //区别不同设备,显示不同设备状态
                            switch (device.functionType)
@@ -90,6 +90,10 @@
                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":
@@ -100,7 +104,7 @@
                                };
                                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":
@@ -111,9 +115,22 @@
                                };
                                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;
                    }
                };
            }