private void button1_Click(object sender, EventArgs e) { if (current != null) { if (!current.Equals(Editbox.Text)) { if (Object.Equals("Index") && tableindex != null) { tool.MySqlQuery(user, "Drop " + Object + " " + Objectname + " ON " + tableindex + ""); } else { if (tool.CheckquerySyntax(user, Editbox.Text)) { tool.MySqlQuery(user, "Drop " + Object + " " + Objectname); } } tool.MySqlQuery(user, Editbox.Text); if (tool.SuccessQuery) { MessageBox.Show(Object + " Sucessfully Changed", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } } } this.Close(); }