private void BtnNewQuery_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(CurConStr)) { MessageBox.Show("Select a database connection"); return; } if (CurrentConnection.IsBusy) { return; } if (!CurrentConnection.Loaded) { CurrentConnection.Initialize(LoadingDialogPosition, false); } MultiQueryForm.QueryForm dlg = new MultiQueryForm.QueryForm(this, CurrentConnection); dlg.ToolTipText = String.Format("{0} - {1}", CurrentConnection.Server, CurrentConnection.DataBase); dlg.Text = String.Format("{0} - {1}", ConxGroup, ConxName); dlg.ShowIcon = true; dlg.Show(WorkPanel, WeifenLuo.WinFormsUI.Docking.DockState.Document); }
public void AddQueryForm(string title, string text, SqlConnector DataProvider) { MultiQueryForm.QueryForm dlg = new MultiQueryForm.QueryForm(this, DataProvider, text); dlg.ToolTipText = String.Format("{0} - {1} / {2} - {3}", DataProvider.Server, DataProvider.DataBase, ConxGroup, ConxName); dlg.Text = String.Format("{0}", title); dlg.ShowIcon = true; dlg.Show(WorkPanel, WeifenLuo.WinFormsUI.Docking.DockState.Document); }