private void buttonReleaseConnector_Click(object sender, System.EventArgs e) { int Index = this.listboxConnectors.SelectedIndex; if (Index == -1) { return; } Npgsql.Connector Connector = (Npgsql.Connector) this.ConnectorList[Index]; try { Connector.Release(); this.listboxConnectors.Items.RemoveAt(Index); this.ConnectorList.RemoveAt(Index); } finally { } this.buttonRefreshPooledConnectors_Click(null, null); this.buttonRefreshSharedConnectors_Click(null, null); }