Exemplo n.º 1
0
        private void DoConnect()
        {
            simpleDebug.dump();
            ConnectForm cf = new ConnectForm();

            if (cf.ShowDialog() == DialogResult.OK)
            {
                //MK
                frmDocument qf = new frmDocument(cf.DbClient, cf.Browser, cf.LowBandwidth, "MSSQL");
                qf.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
                qf.Text     = "Query" + ++_newDocumentCount;
                qf.Show(dockPanel);
            }
        }
Exemplo n.º 2
0
        private void tsNew_Click(object sender, EventArgs e)
        {
            simpleDebug.dump();
            if (IsChildActive())
            {
                // Change the cursor to an hourglass while we're doing this, in case establishing the
                // new connection takes some time.
                Cursor oldCursor = Cursor;
                Cursor = Cursors.WaitCursor;
                frmDocument newQF = GetQueryChild().Clone();
                if (newQF != null)                                                                                                                              // could be null if new connection failed
                {
                    newQF.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
                    newQF.Text     = "Query" + ++_newDocumentCount;

                    newQF.Show(dockPanel);
                    // This is so that we can update the toolbar and menu as the state of the QueryForm changes.
                    //newQF.PropertyChanged += new EventHandler(ChildPropertyChanged);
                }
                Cursor = oldCursor;
            }
        }