private void gridSearchButton_Click(object sender, EventArgs e) { if (this.sesRdb.Checked) { SingleESGridSearch ses = new SingleESGridSearch(); ses.SetVariable(this.variable); ses.ShowDialog(); if (ses.DialogResult == DialogResult.OK) { this.alpha.Text = ses.SelectedAlpha.ToString(); } } else if (this.brownRdb.Checked) { DoubleESBrownGridSearch des = new DoubleESBrownGridSearch(); des.SetVariable(this.variable); des.ShowDialog(); if (des.DialogResult == DialogResult.OK) { this.alpha.Text = des.SelectedAlpha.ToString(); } } else if (this.holtRdb.Checked) { DoubleESHoltGridSearch des = new DoubleESHoltGridSearch(); des.SetVariable(this.variable); des.ShowDialog(); if (des.DialogResult == DialogResult.OK) { this.alpha.Text = des.SelectedAlpha.ToString(); this.gamma.Text = des.SelectedGamma.ToString(); } } else if (this.winterRdb.Checked) { //get seasonal length try { this.esProperties.seasonalLength = int.Parse(this.seasonalBox.Text); } catch { this.esProperties.seasonalLength = 2; } TripleESWinterGridSearch tes = new TripleESWinterGridSearch(); tes.SetVariable(this.variable, this.esProperties.seasonalLength, this.esProperties.isMultiplicative); tes.ShowDialog(); if (tes.DialogResult == DialogResult.OK) { this.alpha.Text = tes.SelectedAlpha.ToString(); this.gamma.Text = tes.SelectedGamma.ToString(); this.beta.Text = tes.SelectedBeta.ToString(); } } }
private void gridSearchButton_Click(object sender, EventArgs e) { if (this.sesRdb.Checked) { SingleESGridSearch ses = new SingleESGridSearch(); ses.SetVariable(this.variable); ses.ShowDialog(); if (ses.DialogResult == DialogResult.OK) this.alpha.Text = ses.SelectedAlpha.ToString(); } else if (this.brownRdb.Checked) { DoubleESBrownGridSearch des = new DoubleESBrownGridSearch(); des.SetVariable(this.variable); des.ShowDialog(); if (des.DialogResult == DialogResult.OK) this.alpha.Text = des.SelectedAlpha.ToString(); } else if (this.holtRdb.Checked) { DoubleESHoltGridSearch des = new DoubleESHoltGridSearch(); des.SetVariable(this.variable); des.ShowDialog(); if (des.DialogResult == DialogResult.OK) { this.alpha.Text = des.SelectedAlpha.ToString(); this.gamma.Text = des.SelectedGamma.ToString(); } } else if (this.winterRdb.Checked) { //get seasonal length try { this.esProperties.seasonalLength = int.Parse(this.seasonalBox.Text); } catch { this.esProperties.seasonalLength = 2; } TripleESWinterGridSearch tes = new TripleESWinterGridSearch(); tes.SetVariable(this.variable, this.esProperties.seasonalLength, this.esProperties.isMultiplicative); tes.ShowDialog(); if (tes.DialogResult == DialogResult.OK) { this.alpha.Text = tes.SelectedAlpha.ToString(); this.gamma.Text = tes.SelectedGamma.ToString(); this.beta.Text = tes.SelectedBeta.ToString(); } } }