tx
2025-04-10 2538101febc78f525945da72c7cdcb2589f9e6ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
 
namespace TProduct.WinFrmUI.TestBench
{
    public class  InstrumentDialog
    {
        public static System.Windows.Forms.Form BuildDialog(TProduct.Model.WorkBenchBase workBenchInfo)
        {
            DevExpress.XtraEditors.XtraForm frm = new DevExpress.XtraEditors.XtraForm();
            frm.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            frm.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
            frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            frm.ClientSize = new System.Drawing.Size(800, 500);
 
         
            if (workBenchInfo.LinkType == Model.eLinkType.ShunZhou)
            {
                TProduct.WinFrmUI.TestBench.ViewAllInstruments4ShunCtrl crl = new TProduct.WinFrmUI.TestBench.ViewAllInstruments4ShunCtrl();
                crl.SetBindingData(workBenchInfo);
                crl.Dock = System.Windows.Forms.DockStyle.Fill;
                frm.Controls.Add(crl);
            }
            else //if (this._workBenchInfo.LinkType == Model.eLinkType.KeDi)
            {
                TProduct.WinFrmUI.TestBench.ViewAllInstruments4KeDiCtrl crl = new TProduct.WinFrmUI.TestBench.ViewAllInstruments4KeDiCtrl();
                crl.SetBindingData(workBenchInfo);
                crl.Dock = System.Windows.Forms.DockStyle.Fill;
                frm.Controls.Add(crl);
            }
 
            return frm;
        }
    }
}