//to do 训练模板
        private void lnk_TrainPattern_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            foreach (Form item in Application.OpenForms)
            {
                if (item is PatternForm)
                {
                    if (item.Owner != this)
                    {
                        return;
                    }
                    if (item.WindowState == FormWindowState.Minimized)
                    {
                        item.WindowState = FormWindowState.Normal;
                    }
                    item.BringToFront();
                    return;
                }
            }
            PatternForm frm = new PatternForm();

            frm.Owner = this;
            frm.Text  = "作业管理器";
            JobToolEditV2 editV2 = new JobToolEditV2();

            editV2.Subject = App.job;
            editV2.Dock    = DockStyle.Fill;
            frm.Size       = new System.Drawing.Size(editV2.Width + 20, editV2.Height + 20);

            frm.Controls.Add(editV2);
            frm.FormClosed += (s, ex) =>
            {
                frm.Dispose();
            };
            frm.Show();
        }
        public void ShowCognexQuickBuildPart(ToolBlockPowerSuite ThisToolBlockPowerSuite)
        {
            PatternForm frm = new PatternForm();

            frm.PrepareToolBlockEditor(frm.editDapter, ThisToolBlockPowerSuite.ThisToolBlock, ThisToolBlockPowerSuite.ThisToolBlock, ThisToolBlockPowerSuite.VppName);
            frm.FormClosed += delegate
            {
                frm.Dispose();
            };
            frm.Show();
        }
        Form ShowJobWindow()
        {
            PatternForm frm = new PatternForm();

            frm.Owner = this;
            frm.Text  = "作业管理器";
            JobToolEditV2 editV2 = new JobToolEditV2();

            editV2.Subject = App.job;
            editV2.Dock    = DockStyle.Fill;
            frm.Size       = new System.Drawing.Size(editV2.Width + 20, editV2.Height + 20);

            frm.Controls.Add(editV2);
            frm.FormClosed += (s, ex) =>
            {
                frm.Dispose();
            };
            frm.Show();
            return(frm);
        }