public void SetFixedRecruitmentControls(EmpiricalRecruitment currentRecruit, Panel panelRecruitModelParameter)
        {
            //create empty obsTable if null
            if (!(currentRecruit.obsTable != null))
            {
                if (!(seqYears != null))
                {
                    currentRecruit.obsTable = currentRecruit.SetNewObsTable(0);
                }
                else
                {
                    currentRecruit.obsTable = currentRecruit.SetNewObsTable(seqYears.Count() - 1);
                }
            }
            else
            {
                //If recruitModel has more rows then resize
                if (currentRecruit.numObs > (this.seqYears.Count() - 1))
                {
                    currentRecruit.obsTable =
                        ControlRecruitment.ResizeDataGridTable(currentRecruit.obsTable, this.seqYears.Count() - 1);
                }
            }

            this.fixedRecruitTable = currentRecruit.obsTable;

            panelRecruitModelParameter.Controls.Clear();
            this.Dock = DockStyle.Fill;
            panelRecruitModelParameter.Controls.Add(this);
        }
Exemplo n.º 2
0
        public virtual void SetEmpiricalRecruitmentControls(EmpiricalRecruitment currentEmpiricalRecruitSelection,
                                                            Panel panelRecruitModelParameter)
        {
            //create empty obsTable if null
            if (!(currentEmpiricalRecruitSelection.obsTable != null))
            {
                currentEmpiricalRecruitSelection.obsTable = currentEmpiricalRecruitSelection.SetNewObsTable(0);
            }

            //Load control in panelRecruitModelParameter
            this.spinBoxNumObservations.DataBindings.Add("value", currentEmpiricalRecruitSelection, "numObs",
                                                         true, DataSourceUpdateMode.OnPropertyChanged);
            this.observationTable = currentEmpiricalRecruitSelection.obsTable;

            panelRecruitModelParameter.Controls.Clear();
            this.Dock = DockStyle.Fill;
            panelRecruitModelParameter.Controls.Add(this);
        }