private void ux_QueryParameters_ItemActivate(object sender, EventArgs e) { using (AddParameter ap = new AddParameter(ux_QueryParameters.SelectedItems[0].Tag as TypedParameter)) { if (ap.ShowDialog(this) == DialogResult.OK) { SetQueryParameter(ap.Parameter); } } }
private void ux_AddParameter_Click(object sender, EventArgs e) { using (AddParameter ap = new AddParameter(ux_ParameterSuggestions.Text)) { if (ap.ShowDialog(this) == DialogResult.Cancel) return; RemoveTopSuggestParameter(); SetQueryParameter(ap.Parameter); } }