private void tryConnectingServer() { cmbDatabases.DataSource = null; lblLoading.Visible = true; DataTable tbll = new DataTable(); completedCallback callback = new completedCallback(updateCombo); ThreadController controller = new ThreadController(callback); Thread t1 = new Thread(new ThreadStart(() => controller.getDatabaseNames(txtDataSource.Text.Trim()))); t1.Start(); }
public ThreadController(completedCallback callback) { this._callback = callback; }