private void _btnSetAlgorithm_Click(object sender, EventArgs e) { ArgsClusterer newAlgo = FrmEditConfigurationCluster.Show(this, this._core, this.SelectedAlgorithm, this._readonly, true); if (newAlgo != null) { this.SelectedAlgorithm = newAlgo; } }
internal static ArgsClusterer Show(Form owner, Core core, ArgsClusterer def, bool readOnly, bool hideOptimise) { using (FrmEditConfigurationCluster frm = new FrmEditConfigurationCluster(core, def, readOnly, hideOptimise)) { if (UiControls.ShowWithDim(owner, frm) == DialogResult.OK) { UiControls.Assert(!readOnly, "Didn't expect an OK result from a readonly dialogue."); return(frm.GetSelection()); } return(null); } }