public DialogResult ShowDialog( int selectedQueryId, string selectedQueryName) { QuerySelectorControl.Setup(selectedQueryId, selectedQueryName); DialogResult dr = ShowDialog(SessionManager.ActiveForm); return(dr); }
private void QuerySelectorDialog_Activated(object sender, EventArgs e) { ActivationCount++; if (ActivationCount == 1) // show menu on first activation only { DelayedCallback.Schedule( // schedule callback delegate(object state) { QuerySelectorControl.ShowSelectQueryMenu(); }); } }
public DialogResult ShowDialog( Query selectedQuery, string selectedViewId) { int selectedQueryId = -1; string selectedQueryName = ""; if (selectedQuery != null) { selectedQueryId = selectedQuery.UserObject.Id; selectedQueryName = selectedQuery.UserObject.Name; } QuerySelectorControl.Setup(selectedQueryId, selectedQueryName, QueryChangedEventHandler); SetupViewSelector(selectedQuery, selectedViewId); DialogResult dr = ShowDialog(SessionManager.ActiveForm); return(dr); }
private void OkButton_Click(object sender, EventArgs e) { if (SelectedQuery == null) { QuerySelectorControl.Focus(); MessageBoxMx.ShowError("A query must be selected"); return; } if (SelectedView == null) { ViewSelectorComboBox.Focus(); MessageBoxMx.ShowError("A view must be selected for the query"); return; } DialogResult = DialogResult.OK; return; }