예제 #1
0
 void BindActiveTabEvents(EditingTabController cont)
 {
     if (cont == null) return;
     cont.RowCountChange += new EditingTabController.RowCountChangeDelegate(QueryWindowForm_RowCountChange);
     cont.ExecController.Start += new StatementExecutionController.StartDelegate(_execController_Start);
     cont.ExecController.End += new StatementExecutionController.EndDelegate(_execController_End);
 }
예제 #2
0
 void Connect(EditingTabController cont)
 {
     NewConnectionForm f = new NewConnectionForm();
     if (DialogResult.OK == f.ShowDialog())
     {
         if (_editingTabList.Count == 0)
             FileNewCommand();
         cont.ExecController.Connection = f.Connection.OpenConnection;
         cont.Connection = f.Connection;
         cont.UpdateTabTitle();
     }
 }
예제 #3
0
        private void FileOpenCommand(string filename)
        {
            EditingTabController c;
            bool toadd = true;
            if (filesTabControl.TabCount > 0)
            {
                c = _editingTabList[filesTabControl.SelectedTab];
                if (!(c.IsEmpty && c.FileName == null))
                    c = new EditingTabController();
                else
                    toadd = false;
            }
            else
                c = new EditingTabController();

            c.FileName = filename;
            c.UpdateTabTitle();
            TabPage tab = c.Tab;
            if (toadd)
            {
                filesTabControl.TabPages.Add(tab);
                _editingTabList.Add(c.Tab, c);
                filesTabControl.SelectedTab = tab;
            }
            c.Reload();
        }
예제 #4
0
 private void FileNewCommand()
 {
     EditingTabController c = new EditingTabController();
     c.FileName = null;
     TabPage tab = c.Tab;
     tab.Text = SR.NewFile + (filesTabControl.TabPages.Count + 1);
     filesTabControl.TabPages.Add(tab);
     _editingTabList.Add(c.Tab, c);
     filesTabControl.SelectedTab = tab;
     c.Reload();
 }