private void buttonOk_Click(object sender, EventArgs e) { // Focus(); // FilterOptions = GetFilterOption(); if (FilterOptions != null) { DialogResult = DialogResult.OK; Close(); } }
private FilterOption GetFilterOption() { double top, bottom; if (!double.TryParse(textBoxTopElevation.Text, out top)) { MessageBox.Show("顶部标高不是有效的数值", "出错"); return(null); } if (!double.TryParse(textBoxBottomElevation.Text, out bottom)) { MessageBox.Show("底部标高不是有效的数值", "出错"); return(null); } // FilterOption fo = new FilterOption(top, bottom, checkAllConnector: checkBoxcheckAllConnector.Checked, showElementsInRange: radioButtonShow.Checked); // return(fo); }
private void buttonCancel_Click(object sender, EventArgs e) { DialogResult = DialogResult.Cancel; FilterOptions = null; Close(); }