Пример #1
0
        public void ExplorerObjectDoubleClick(ExplorerObjectEventArgs e)
        {
            FormCosmoDbConnection dlg = new FormCosmoDbConnection();

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string connectionString = dlg.ConnectionString;
                string name             = connectionString.ExtractConnectionStringParameter("database");

                ConfigConnections connStream = new ConfigConnections("cosmodb", "546B0513-D71D-4490-9E27-94CD5D72C64A");
                connStream.Add(name, connectionString);

                e.NewExplorerObject = new CosmoDbExplorerObject(this.ParentExplorerObject, name, connectionString);
            }
        }
Пример #2
0
        void ConnectionProperties_Click(object sender, EventArgs e)
        {
            if (_connectionString == null)
            {
                return;
            }

            FormCosmoDbConnection dlg = new FormCosmoDbConnection();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string connectionString = dlg.ConnectionString;

                ConfigConnections connStream = new ConfigConnections("cosmodb", "546B0513-D71D-4490-9E27-94CD5D72C64A");
                connStream.Add(_name, connectionString);

                _connectionString = connectionString;
            }
        }