private void Button1_Click(object sender, EventArgs e) { TextHandler.Invoke(textBox1.Text); DialogResult = DialogResult.OK; }