public CModelPara() { for (int i = 0; i < C_ITEM_MAX; i++) { OutPut[i] = new COutPut_List(); OnOff[i] = new COnOff_List(); } }
public FrmOutPut(int idNo, int chanNum, COutPut_List Output) { InitializeComponent(); IntialControl(); SetDoubleBuffered(); load(idNo, chanNum, Output); }
/// <summary> /// 创建唯一实例 /// </summary> public static FrmOutPut CreateInstance(int idNo, int chanNum, COutPut_List Output) { lock (syncRoot) { if (dlg == null || dlg.IsDisposed) { dlg = new FrmOutPut(idNo, chanNum, Output); } } return(dlg); }
/// <summary> /// 加载设置 /// </summary> /// <param name="idNo"></param> /// <param name="Output"></param> public void load(int idNo, int chanNum, COutPut_List Output) { try { this._idNo = idNo; this._chanNum = chanNum; _outPut = Output.Clone(); refreshOutPutPara(); } catch (Exception) { throw; } }
/// <summary> /// 复制 /// </summary> /// <returns></returns> public COutPut_List Clone() { COutPut_List outPut = new COutPut_List(); outPut.Describe = this.Describe; for (int i = 0; i < CHAN_MAX; i++) { outPut.Chan[i] = new COutPut_CH(); outPut.Chan[i].Vname = this.Chan[i].Vname; outPut.Chan[i].Vmin = this.Chan[i].Vmin; outPut.Chan[i].Vmax = this.Chan[i].Vmax; outPut.Chan[i].Imode = this.Chan[i].Imode; outPut.Chan[i].ISet = this.Chan[i].ISet; outPut.Chan[i].Imin = this.Chan[i].Imin; outPut.Chan[i].Imax = this.Chan[i].Imax; outPut.Chan[i].QCType = this.Chan[i].QCType; outPut.Chan[i].QCV = this.Chan[i].QCV; } return(outPut); }
/// <summary> /// 绑定控件 /// </summary> private void IntialControl() { cmbQCVType.Items.Clear(); List <string> qcvList = new List <string>(); string[] strQcv = CKunXApp.QCM_Type.Split(','); for (int i = 0; i < strQcv.Length; i++) { if (!qcvList.Contains(strQcv[i]) && Enum.IsDefined(typeof(EQCM), strQcv[i])) { qcvList.Add(strQcv[i]); cmbQCVType.Items.Add(strQcv[i]); } } _outPut = new COutPut_List[OUTPUT_MAX]; for (int i = 0; i < OUTPUT_MAX; i++) { _outPut[i] = new COutPut_List(); } FrmOutPut.OnSaveArgs.OnEvent += new COnEvent <FrmOutPut.COutPutArgs> .OnEventHandler(OnOutPutSaveArgs); _onOff = new COnOff_List[ONOFF_MAX]; for (int i = 0; i < ONOFF_MAX; i++) { _onOff[i] = new COnOff_List(); } FrmOnOff.OnSaveArgs.OnEvent += new COnEvent <FrmOnOff.COnOffArgs> .OnEventHandler(OnOnOffSaveArgs); }
public COutPutArgs(int idNo, COutPut_List outPut) { this.idNo = idNo; this.outPut = outPut; }