private void ArgsButtonClick(TextBox textBox) { ToolArgsDialog dlg = new ToolArgsDialog(this.logTabWin, this); dlg.Arg = textBox.Text; if (dlg.ShowDialog() == DialogResult.OK) { textBox.Text = dlg.Arg; } }