Exemple #1
0
        private void AddNewConnectionSpec()
        {
            frmConnectionParams frm = new frmConnectionParams();

            frm.TopMost = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                AddConnectionSpecToList(frm.GetCurrentConnectionSpec());
                ConnectionParamsFactory.Save(_connParams);
                InvalidateButtons();
            }
        }
Exemple #2
0
        private void CreateNewConnection(bool wantEmptyScript)
        {
            frmConnectionParams frm    = new frmConnectionParams(false);
            DialogResult        dlgRes = frm.ShowDialog();

            if (dlgRes != DialogResult.OK)
            {
                return;
            }

            OpenConnection(frm.GetCurrentConnectionSpec());
            if (wantEmptyScript)
            {
                CreateNewScriptEditor();
            }
        }
Exemple #3
0
        private void EditSelectedConnectionSpec()
        {
            if (lvConnections.SelectedItems.Count == 0)
            {
                return;
            }

            frmConnectionParams frm = new frmConnectionParams(this.SelectedDataSource, true);

            frm.TopMost = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                _connParams.Delete(this.SelectedDataSource);
                lvConnections.Items.Remove(lvConnections.SelectedItems[0]);
                AddConnectionSpecToList(frm.GetCurrentConnectionSpec());
                ConnectionParamsFactory.Save(_connParams);
                InvalidateButtons();
            }
        }