Exemplo n.º 1
0
        void VIEW_ExitLineSaddle_Load(object sender, EventArgs e)
        {
            //绑定鞍座控件
            dicSaddleControls["鞍座号"] = coilUnitSaddle1;


            //实例化机组鞍座处理类
            saddleMethod = new UnitSaddleMethod(constData.UnitNo, constData.ExitSaddleDefine, constData.tagServiceName);
            saddleMethod.ReadDefintion();

            lineSaddleTag.InitTagDataProvider(constData.tagServiceName);
            //把表中的tag名称赋值到控件中
            foreach (Control control in panelAutoScroll.Controls)
            {
                //添加解锁鞍座控件
                if (control is CoilUnitSaddleButton)
                {
                    CoilUnitSaddleButton t = (CoilUnitSaddleButton)control;
                    if (saddleMethod.DicSaddles.ContainsKey(t.MySaddleNo))
                    {
                        UnitSaddleBase theSaddleInfo = saddleMethod.DicSaddles[t.MySaddleNo];
                        if (!string.IsNullOrEmpty(theSaddleInfo.TagAdd_LockRequest) && theSaddleInfo.TagAdd_LockRequest != "")
                        {
                            //t.MySaddleTagName = theSaddleInfo.TagAdd_LockRequest;
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest);
                        }
                    }
                }
                //添加机组状态控件
                if (control is CoilUnitStatus)
                {
                    CoilUnitStatus t = (CoilUnitStatus)control;
                    if (!string.IsNullOrEmpty(t.MyStatusTagName) && t.MyStatusTagName != "")
                    {
                        lineSaddleTag.AddTagName(t.MyStatusTagName);
                    }
                }
            }

            lineSaddleTag.SetReady();
            //把实例化后的机组tag处理类装备每个控件
            foreach (Control control in panelAutoScroll.Controls)
            {
                if (control is CoilUnitSaddleButton)
                {
                    CoilUnitSaddleButton t = (CoilUnitSaddleButton)control;
                    t.InitUnitSaddle(lineSaddleTag);
                }
            }

            exitSaddleInfo.getExitSaddleDt(dgvExitSaddleInfo, constData.UnitNo);
            //是否开启定时器
            timer_LineSaddleControl.Enabled = true;
            //设定刷新时间
            timer_LineSaddleControl.Interval = 5000;
        }
Exemplo n.º 2
0
        void VIEW_H145ExitLineSaddle_Load(object sender, EventArgs e)
        {
            auth = FrameContext.Instance.GetPlugin <IAuthorization>() as IAuthorization;
            //绑定鞍座控件
            dicSaddleControls["QWE12"] = coilUnitSaddle_QWE12;
            dicSaddleControls["QWE15"] = coilUnitSaddle_QWE15;
            dicSaddleControls["QWE16"] = coilUnitSaddle_QWE16;
            dicSaddleControls["QWE17"] = coilUnitSaddle_QWE17;
            dicSaddleControls["QWE22"] = coilUnitSaddle_QWE22;
            dicSaddleControls["QWE23"] = coilUnitSaddle_QWE23;
            dicSaddleControls["QWE24"] = coilUnitSaddle_QWE24;

            //coilUnitSaddleButton_QWE12.MySaddleNo = "QWE12";
            coilUnitSaddleButton_QWE15.MySaddleNo = "QWE15";
            //coilUnitSaddleButton_QWE16.MySaddleNo = "QWE16";
            //coilUnitSaddleButton_QWE17.MySaddleNo = "QWE17";
            //coilUnitSaddleButton_QWE22.MySaddleNo = "QWE22";
            //coilUnitSaddleButton_QWE23.MySaddleNo = "QWE23";
            coilUnitSaddleButton_QWE24.MySaddleNo = "QWE24";


            //实例化机组鞍座处理类
            saddleMethod = new UnitSaddleMethod(H145Unit, constData.ExitSaddleDefine, constData.tagServiceName);
            saddleMethod.ReadDefintion();

            lineSaddleTag.InitTagDataProvider(constData.tagServiceName);

            //把表中的tag名称赋值到控件中
            foreach (Control control in groupBox2.Controls)
            {
                //添加解锁鞍座控件
                if (control is CoilUnitSaddleButton)
                {
                    CoilUnitSaddleButton t = (CoilUnitSaddleButton)control;
                    if (saddleMethod.DicSaddles.ContainsKey(t.MySaddleNo))
                    {
                        UnitSaddleBase theSaddleInfo = saddleMethod.DicSaddles[t.MySaddleNo];
                        if (!string.IsNullOrEmpty(theSaddleInfo.TagAdd_LockRequest) && theSaddleInfo.TagAdd_LockRequest != "")
                        {
                            t.MySaddleTagName_Feedback = theSaddleInfo.TagAdd_LockRequest_FEEDBACK;
                            t.MySaddleTagName_Set      = theSaddleInfo.TagAdd_LockRequest_SET;
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest_SET);
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest_FEEDBACK);
                        }
                    }
                }
                //添加机组状态控件
                //if (control is CoilUnitStatus)
                //{
                //    CoilUnitStatus t = (CoilUnitStatus)control;
                //    if (!string.IsNullOrEmpty(t.MyStatusTagName) && t.MyStatusTagName != "")
                //    {
                //        lineSaddleTag.AddTagName(t.MyStatusTagName);
                //    }
                //}
            }
            foreach (Control control in groupBox3.Controls)
            {
                //添加解锁鞍座控件
                if (control is CoilUnitSaddleButton)
                {
                    CoilUnitSaddleButton t = (CoilUnitSaddleButton)control;
                    if (saddleMethod.DicSaddles.ContainsKey(t.MySaddleNo))
                    {
                        UnitSaddleBase theSaddleInfo = saddleMethod.DicSaddles[t.MySaddleNo];
                        if (!string.IsNullOrEmpty(theSaddleInfo.TagAdd_LockRequest) && theSaddleInfo.TagAdd_LockRequest != "")
                        {
                            t.MySaddleTagName_Feedback = theSaddleInfo.TagAdd_LockRequest_FEEDBACK;
                            t.MySaddleTagName_Set      = theSaddleInfo.TagAdd_LockRequest_SET;
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest_SET);
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest_FEEDBACK);
                        }
                    }
                }
            }

            lineSaddleTag.SetReady();
            //把实例化后的机组tag处理类装备每个控件
            foreach (Control control in groupBox2.Controls)
            {
                if (control is CoilUnitSaddleButton)
                {
                    CoilUnitSaddleButton t = (CoilUnitSaddleButton)control;
                    t.InitUnitSaddle(lineSaddleTag);
                }
            }
            foreach (Control control in groupBox3.Controls)
            {
                if (control is CoilUnitSaddleButton)
                {
                    CoilUnitSaddleButton t = (CoilUnitSaddleButton)control;
                    t.InitUnitSaddle(lineSaddleTag);
                }
            }

            exitSaddleInfo.getExitSaddleDt(dgvExitSaddleInfo, H145Unit);
            //是否开启定时器
            timer_LineSaddleControl.Enabled = true;
            //设定刷新时间
            timer_LineSaddleControl.Interval = 5000;
        }
Exemplo n.º 3
0
        void VIEW_ChainLineSaddle_Load(object sender, EventArgs e)
        {
            auth = FrameContext.Instance.GetPlugin <IAuthorization>() as IAuthorization;
            //绑定鞍座控件
            dicSaddleControls["PCQ17Z0"] = coilUnitSaddle_PCQ17Z0;
            dicSaddleControls["PCQ16Z0"] = coilUnitSaddle_PCQ16Z0;
            dicSaddleControls["PCQ15Z0"] = coilUnitSaddle_PCQ15Z0;
            dicSaddleControls["PCQ14Z0"] = coilUnitSaddle_PCQ14Z0;
            dicSaddleControls["PCQ13Z0"] = coilUnitSaddle_PCQ13Z0;
            dicSaddleControls["PCQ12Z0"] = coilUnitSaddle_PCQ12Z0;
            dicSaddleControls["PCQ10Z0"] = coilUnitSaddle_PCQ10Z0;
            dicSaddleControls["PCQ09Z0"] = coilUnitSaddle_PCQ09Z0;
            dicSaddleControls["PCQ08Z0"] = coilUnitSaddle_PCQ08Z0;
            dicSaddleControls["PCQ07Z0"] = coilUnitSaddle_PCQ07Z0;
            dicSaddleControls["PCQ06Z0"] = coilUnitSaddle_PCQ06Z0;
            dicSaddleControls["PCQ05Z0"] = coilUnitSaddle_PCQ05Z0;
            dicSaddleControls["PCQ04Z0"] = coilUnitSaddle_PCQ04Z0;
            dicSaddleControls["PCQ03Z0"] = coilUnitSaddle_PCQ03Z0;

            coilUnitSaddleButton_PCQ17Z0.MySaddleNo = "PCQ17Z0";
            coilUnitSaddleButton_PCQ16Z0.MySaddleNo = "PCQ16Z0";
            coilUnitSaddleButton_PCQ15Z0.MySaddleNo = "PCQ15Z0";
            coilUnitSaddleButton_PCQ14Z0.MySaddleNo = "PCQ14Z0";
            coilUnitSaddleButton_PCQ13Z0.MySaddleNo = "PCQ13Z0";
            coilUnitSaddleButton_PCQ12Z0.MySaddleNo = "PCQ12Z0";
            coilUnitSaddleButton_PCQ10Z0.MySaddleNo = "PCQ10Z0";
            coilUnitSaddleButton_PCQ09Z0.MySaddleNo = "PCQ09Z0";
            coilUnitSaddleButton_PCQ08Z0.MySaddleNo = "PCQ08Z0";
            coilUnitSaddleButton_PCQ07Z0.MySaddleNo = "PCQ07Z0";
            coilUnitSaddleButton_PCQ06Z0.MySaddleNo = "PCQ06Z0";
            coilUnitSaddleButton_PCQ05Z0.MySaddleNo = "PCQ05Z0";
            coilUnitSaddleButton_PCQ04Z0.MySaddleNo = "PCQ04Z0";
            coilUnitSaddleButton_PCQ03Z0.MySaddleNo = "PCQ03Z0";


            //实例化机组鞍座处理类
            exitSaddleMethod = new UnitSaddleMethod(Chain, constData.ExitSaddleDefine, constData.tagServiceName);
            exitSaddleMethod.ReadDefintion();
            entrySaddleMethod = new UnitSaddleMethod(Chain, constData.EntrySaddleDefine, constData.tagServiceName);
            entrySaddleMethod.ReadDefintion();

            lineSaddleTag.InitTagDataProvider(constData.tagServiceName);
            //把表中的tag名称赋值到控件中
            foreach (Control control in panelAutoScroll.Controls)
            {
                //添加解锁鞍座控件
                if (control is CoilUnitSaddleButton)
                {
                    CoilUnitSaddleButton t = (CoilUnitSaddleButton)control;
                    if (exitSaddleMethod.DicSaddles.ContainsKey(t.MySaddleNo))
                    {
                        UnitSaddleBase theSaddleInfo = exitSaddleMethod.DicSaddles[t.MySaddleNo];
                        if (!string.IsNullOrEmpty(theSaddleInfo.TagAdd_LockRequest) && theSaddleInfo.TagAdd_LockRequest != "")
                        {
                            t.MySaddleTagName_Feedback = theSaddleInfo.TagAdd_LockRequest_FEEDBACK;
                            t.MySaddleTagName_Set      = theSaddleInfo.TagAdd_LockRequest_SET;
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest_SET);
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest_FEEDBACK);
                        }
                    }
                    else if (entrySaddleMethod.DicSaddles.ContainsKey(t.MySaddleNo))
                    {
                        UnitSaddleBase theSaddleInfo = entrySaddleMethod.DicSaddles[t.MySaddleNo];
                        if (!string.IsNullOrEmpty(theSaddleInfo.TagAdd_LockRequest) && theSaddleInfo.TagAdd_LockRequest != "")
                        {
                            t.MySaddleTagName_Feedback = theSaddleInfo.TagAdd_LockRequest_FEEDBACK;
                            t.MySaddleTagName_Set      = theSaddleInfo.TagAdd_LockRequest_SET;
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest_SET);
                            lineSaddleTag.AddTagName(theSaddleInfo.TagAdd_LockRequest_FEEDBACK);
                        }
                    }
                }
                //添加机组状态控件
                if (control is CoilUnitStatus)
                {
                    CoilUnitStatus t = (CoilUnitStatus)control;
                    if (!string.IsNullOrEmpty(t.MyStatusTagName) && t.MyStatusTagName != "")
                    {
                        lineSaddleTag.AddTagName(t.MyStatusTagName);
                    }
                }
            }

            lineSaddleTag.SetReady();
            //把实例化后的机组tag处理类装备每个控件
            foreach (Control control in panelAutoScroll.Controls)
            {
                if (control is CoilUnitSaddleButton)
                {
                    CoilUnitSaddleButton t = (CoilUnitSaddleButton)control;
                    t.InitUnitSaddle(lineSaddleTag);
                }
            }

            exitSaddleInfo.getExitSaddleDt(dgvExitSaddleInfo, Chain);
            entrySaddleInfo.getEntrySaddleDt(dgvEntrySaddleInfo, Chain);
            //是否开启定时器
            timer_LineSaddleControl.Enabled = true;
            //设定刷新时间
            timer_LineSaddleControl.Interval = 5000;
        }