示例#1
0
 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;
         }
     }
 }
示例#2
0
 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;
         }
     }
 }