code_junkie

What is the best way to pass data between a MainFrame (or Main Dialog) and a Modal Dialog?

Nov 12th, 2011
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public string UserName
  2. {
  3. get { return userNameTextBox.Text; }
  4. }
  5.  
  6. Dialog dialog = new Dialog();
  7. if (dialog.ShowDialog() == DialogResult.OK)
  8. {
  9. string username = dialog.UserName;
  10. }
  11.  
  12. myGetter.SetTransferObject(dataStructInstance)
  13. myGetter.GoGetTheData()
  14. // do stuff with dataStructInstance now that myGetter set it up.
Add Comment
Please, Sign In to add comment