private void connTest_Click(object sender, EventArgs e) { using (ConnTestForm t = new ConnTestForm(this)) { t.ShowDialog(); WriteData(true); } }