コード例 #1
0
        private void btnDeleteNumber_Click(object sender, EventArgs e)
        {
            CParameterInitialize ParameterInitialize = _DataRecords.ParameterInitialize;

            var cboLayer2 = ParameterInitialize.cboLayerLt[2];
            var cboLayer3 = ParameterInitialize.cboLayerLt[3];

            ParameterInitialize.cboLayerLt.RemoveAt(3);
            ParameterInitialize.cboLayerLt.RemoveAt(2);

            //读取数据
            _pCGABM = new CCGABM(ParameterInitialize, 4);

            this.txtDeleteNumber.Text = _pCGABM.ComputeDeleteNumber().ToString();

            ParameterInitialize.cboLayerLt.Insert(2, cboLayer2);
            ParameterInitialize.cboLayerLt.Insert(3, cboLayer3);

            _DataRecords.ParameterResult = _pCGABM.ParameterResult;
            //CHelpFuncExcel.KillExcel();
            MessageBox.Show("Done!");
        }
コード例 #2
0
        private void btnComputeDeleteNumber_Click(object sender, EventArgs e)
        {
            CParameterInitialize ParameterInitialize = _DataRecords.ParameterInitialize;

            var cboLayer2 = ParameterInitialize.cboLayerLt[2];
            var cboLayer3 = ParameterInitialize.cboLayerLt[3];

            ParameterInitialize.cboLayerLt.RemoveAt(3);
            ParameterInitialize.cboLayerLt.RemoveAt(2);

            //Read Datasets
            //note that we have skipped two layers; see the preceding lines
            _pCGABM = new CCGABM(ParameterInitialize, 0, 4);

            this.txtDeleteNumber.Text = _pCGABM.ComputeDeleteNumber().ToString();

            ParameterInitialize.cboLayerLt.Insert(2, cboLayer2);
            ParameterInitialize.cboLayerLt.Insert(3, cboLayer3);

            _DataRecords.ParameterResult = _pCGABM.ParameterResult;
            //CHelpFuncExcel.KillExcel();
            MessageBox.Show("Done!");
        }