public static void ReleaseSingleton()
 {
     if (mSingleton != null)
     {
         mSingleton.Dispose();
     }
 }
Ejemplo n.º 2
0
        private void btnMSTestConnection_Click(object sender, EventArgs e)
        {
            DbUtilMSSQL util = new DbUtilMSSQL();

            util.Connect(tbMSHostname.Text + "," + tbMSPort.Text,
                         tbMSDatabase.Text, tbMSUser.Text, tbMSPassword.Text);
            TestConnectionForm form = new TestConnectionForm();

            if (util.IsConnected && util.DatabaseExist(tbMSDatabase.Text))
            {
                form.SetText("Connection successfull.");
                form.SetDetails(util.ConnectionInfo);
            }
            else
            {
                form.SetText("Connection failed.");
                form.SetDetails(util.ConnectionInfo);
            }
            form.Show();
            util.Dispose();
        }