private void btnEditString_Click(object sender, EventArgs e) { using (var editor = new MultilineStringEditor()) { editor.Text = txtString.Text; DialogResult result = editor.ShowDialog(this); if (result == DialogResult.OK) { txtString.Text = editor.Text; } } }
private void txtString_DoubleClick(object sender, EventArgs e) { using (var editor = new MultilineStringEditor()) { editor.Text = txtString.Text; DialogResult result = editor.ShowDialog(this); if (result == DialogResult.OK) { txtString.Text = editor.Text; } } }