private void toolStripAddDatasource_Click(object sender, EventArgs e) { DataSourceForm dsForm = new DataSourceForm(false); if (dsForm.ShowDialog() != DialogResult.OK) { return; } IConnectionInfo ci = new ConnectionInfo(); switch (dsForm.ConnectionType) { case "gviConnectionMySql5x": ci.ConnectionType = gviConnectionType.gviConnectionMySql5x; break; case "gviConnectionFireBird2x": ci.ConnectionType = gviConnectionType.gviConnectionFireBird2x; break; case "gviConnectionSQLite3": ci.ConnectionType = gviConnectionType.gviConnectionSQLite3; break; } ci.Server = dsForm.Server; ci.Port = dsForm.Port; ci.Database = dsForm.Database; ci.UserName = dsForm.UserName; ci.Password = dsForm.Password; bindDataToCatalogTree(ci); }
private void toolStripAddDatasource_Click(object sender, EventArgs e) { DataSourceForm dsForm = new DataSourceForm(false, controlOperation); if (dsForm.ShowDialog() == DialogResult.OK) { DabaseConnectionInfo dcInfor = new DabaseConnectionInfo { Server = dsForm.Server, Port = dsForm.Port, Database = dsForm.Database, UserName = dsForm.UserName, PassWord = dsForm.PassWord }; controlOperation.ConnectAndGetDatabaseNames(dsForm.ConnectionType, dcInfor); //controlOperation.BindDataToCatalogTree(); } }