Guest User

Untitled

a guest
Apr 20th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. [System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
  2. public class Pug_NewText
  3. {
  4. public string _Text = "Test Stuff";
  5.  
  6. public event EventHandler Before;
  7. public event EventHandler After;
  8.  
  9. [Browsable(true)]
  10. [EditorBrowsable()]
  11. [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
  12. public string Text
  13. {
  14. get => _Text;
  15. set
  16. {
  17. Before?.Invoke(this, new EventArgs());
  18. _Text = value;
  19. After?.Invoke(this, new EventArgs());
  20. }
  21. }
  22.  
  23. public override string ToString()
  24. {
  25. return (_Text);
  26. }
  27. }
  28.  
  29. public class TestControl : Control
  30. {
  31. private Pug_NewText _NewText = new Pug_NewText();
  32.  
  33. public TestControl()
  34. {
  35. _NewText._Text = "TestStuff";
  36. }
  37.  
  38. [Browsable(true)]
  39. [EditorBrowsable()]
  40. [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
  41. public Pug_NewText NewText
  42. {
  43. get => _NewText;
  44. set => _NewText = value;
  45. }
  46.  
  47. public override string ToString()
  48. {
  49. return (_NewText._Text);
  50. }
  51. }
Add Comment
Please, Sign In to add comment