private void ShowTextEditor()
 {
     TextViewer viewer = new TextViewer();
     viewer.TextValue = txt.Text;
     DialogResult result = viewer.ShowDialog(this);
     if(result== DialogResult.OK)
         txt.Text = viewer.TextValue;
 }
        private void ShowTextEditor()
        {
            TextViewer viewer = new TextViewer();

            viewer.TextValue = txt.Text;
            DialogResult result = viewer.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                txt.Text = viewer.TextValue;
            }
        }