Exemple #1
0
        /// <summary>
        /// 复制
        /// </summary>
        /// <returns></returns>
        public COnOff_List Clone()
        {
            try
            {
                COnOff_List list = new COnOff_List();

                list.Describe = this.Describe;

                list.TotalTime = this.TotalTime;

                for (int i = 0; i < ITEM_MAX; i++)
                {
                    list.Item[i].ChkSec     = this.Item[i].ChkSec;
                    list.Item[i].OnOffTime  = this.Item[i].OnOffTime;
                    list.Item[i].OnTime     = this.Item[i].OnTime;
                    list.Item[i].OffTime    = this.Item[i].OffTime;
                    list.Item[i].ACV        = this.Item[i].ACV;
                    list.Item[i].OutPutType = this.Item[i].OutPutType;
                }

                return(list);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #2
0
 public CModelPara()
 {
     for (int i = 0; i < C_ITEM_MAX; i++)
     {
         OutPut[i] = new COutPut_List();
         OnOff[i]  = new COnOff_List();
     }
 }
Exemple #3
0
 /// <summary>
 /// 创建唯一实例
 /// </summary>
 public static FrmOnOff CreateInstance(int idNo, int outPutNum, COnOff_List OnOff)
 {
     lock (syncRoot)
     {
         if (dlg == null || dlg.IsDisposed)
         {
             dlg = new FrmOnOff(idNo, outPutNum, OnOff);
         }
     }
     return(dlg);
 }
Exemple #4
0
        public FrmOnOff(int idNo, int outPutNum, COnOff_List Output)
        {
            this._idNo = idNo;

            this._outPutNum = outPutNum;

            this._OnOff = Output.Clone();

            InitializeComponent();

            IntialControl();

            SetDoubleBuffered();
        }
Exemple #5
0
        /// <summary>
        /// 绑定控件
        /// </summary>
        private void IntialControl()
        {
            cmbQCVType.Items.Clear();

            List <string> qcvList = new List <string>();

            string[] strQcv = CYOHOOApp.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);
        }
Exemple #6
0
 public COnOffArgs(int idNo, COnOff_List outPut)
 {
     this.idNo   = idNo;
     this.outPut = outPut;
 }