public static void ReleaseSingleton() { if (mSingleton != null) { mSingleton.Dispose(); mSingleton = null; } }
private void btnHANATestConnection_Click(object sender, EventArgs e) { DbUtil util = new DbUtil(); util.Connect(tbHANAHostname.Text + ":" + tbHANAPort.Text, tbHANASchema.Text, tbHANAUser.Text, tbHANAPassword.Text); TestConnectionForm form = new TestConnectionForm(); if (util.IsConnected && util.SchemaExist(tbHANASchema.Text)) { form.SetText("Connection successfull."); form.SetDetails(util.ConnectionInfo); } else { form.SetText("Connection failed."); form.SetDetails(util.ConnectionInfo); } form.Show(); util.Dispose(); }