private void chkSProb_CheckedChanged(object sender, EventArgs e) { if (((CheckBox)sender).Checked) { CoherenceProps = new GCDCore.Project.CoherenceProperties(); } else { CoherenceProps = null; } }
private void cmdSProb_Click(object sender, EventArgs e) { bool bNewObject = false; if (CoherenceProps == null) { CoherenceProps = new GCDCore.Project.CoherenceProperties(); bNewObject = true; } frmCoherenceProperties frm = new frmCoherenceProperties(CoherenceProps); if (frm.ShowDialog() != DialogResult.OK && bNewObject) { // User canceled form and there were no existing coherence properties. // Reset the coherence properties item. CoherenceProps = null; } }
private void frmBatchDoDProperties_Load(object sender, EventArgs e) { ucDEMs.EnableErrorSurfaces(ThresholdType != frmBatchDoD.ThresholdTypes.MinLoDSingle && ThresholdType != frmBatchDoD.ThresholdTypes.MinLoDMulti); string vertUnits = UnitsNet.Length.GetAbbreviation(GCDCore.Project.ProjectManager.Project.Units.VertUnit); lblMin.Visible = ThresholdType != frmBatchDoD.ThresholdTypes.Propagated; valMin.Visible = ThresholdType != frmBatchDoD.ThresholdTypes.Propagated; chkBayesian.Checked = false; CoherenceProps = null; bool bRange = ThresholdType == frmBatchDoD.ThresholdTypes.MinLoDMulti || ThresholdType == frmBatchDoD.ThresholdTypes.ProbMulti; lblMax.Visible = bRange; valMax.Visible = bRange; lblInterval.Visible = bRange; valInterval.Visible = bRange; chkBayesian.Top = BayesianChkTop; cmdBayesian.Top = BayesianCmdTop; bool bProb = ThresholdType == frmBatchDoD.ThresholdTypes.ProbSingle || ThresholdType == frmBatchDoD.ThresholdTypes.ProbMulti; chkBayesian.Visible = bProb; cmdBayesian.Visible = bProb; switch (ThresholdType) { case frmBatchDoD.ThresholdTypes.MinLoDSingle: lblMin.Text = string.Format("Minimum level of detection ({0})", vertUnits); Height = valMin.Bottom + Spacing; break; case frmBatchDoD.ThresholdTypes.MinLoDMulti: lblMin.Text = string.Format("Minimum MinLoD threshold ({0})", vertUnits); lblMax.Text = string.Format("Maximum MinLoD threshold ({0})", vertUnits); lblInterval.Text = string.Format("Interval ({0})", vertUnits); Height = valMax.Bottom + Spacing; break; case frmBatchDoD.ThresholdTypes.ProbSingle: lblMin.Text = "Confidence level (0-1)"; valMin.Minimum = 0.01m; valMin.Value = 0.8m; valMin.Maximum = 1; chkBayesian.Top = lblMax.Top; cmdBayesian.Top = valMax.Top; Height = valMax.Bottom + Spacing; break; case frmBatchDoD.ThresholdTypes.ProbMulti: lblMin.Text = "Minimum confidence level (0-1)"; lblMax.Text = "Maximum confidence level (0-1)"; lblInterval.Text = "Interval (0-1)"; valMin.Minimum = 0.01m; valMin.Maximum = 1; valMax.Minimum = 0.01m; valMax.Maximum = 1; valInterval.Maximum = 1; Height = chkBayesian.Bottom + Spacing; break; default: Height = ucDEMs.Bottom + Spacing; break; } valMin.Value = valMin.Minimum; valMax.Value = valMax.Minimum; valInterval.Value = valInterval.Minimum; }