Exemplo n.º 1
0
 public CModelPara()
 {
     for (int i = 0; i < C_ITEM_MAX; i++)
     {
         OutPut[i] = new COutPut_List();
         OnOff[i]  = new COnOff_List();
     }
 }
Exemplo n.º 2
0
        public FrmOutPut(int idNo, int chanNum, COutPut_List Output)
        {
            InitializeComponent();

            IntialControl();

            SetDoubleBuffered();

            load(idNo, chanNum, Output);
        }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
        /// <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;
            }
        }
Exemplo n.º 5
0
        /// <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);
        }
Exemplo n.º 6
0
        /// <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);
        }
Exemplo n.º 7
0
 public COutPutArgs(int idNo, COutPut_List outPut)
 {
     this.idNo   = idNo;
     this.outPut = outPut;
 }