private void testDatabaseToolStripMenuItem_Click(object sender, EventArgs e) { try { MySQLFunction mySQLFunction1 = new MySQLFunction(); if (mySQLFunction1.connect()) { setStatus("Database connection succeed", Color.Green, 100); MessageBox.Show("Database connection succeed"); } else { setStatus("Database connection failed, Please make sure your config are right", Color.Red, 0); MessageBox.Show("Database connection failed, please check your network or configuration"); } } catch {} }