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; } } }