Guest User

Untitled

a guest
Jun 23rd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. public string TextValue
  2. {
  3. set
  4. {
  5. if (this.Memo.InvokeRequired)
  6. {
  7. this.Invoke((MethodInvoker)delegate
  8. {
  9. this.Memo.Text += value + "n";
  10. });
  11. }
  12. else
  13. {
  14. this.Memo.Text += value + "n";
  15. }
  16. }
  17. }
  18.  
  19. public int Timer
  20. {
  21. set
  22. {
  23. if (this.timer.InvokeRequired) //?? No such thing
  24. {
  25. this.Invoke((MethodInvoker)delegate
  26. {
  27. if (value == 1)
  28. this.timer.Enabled = true;
  29. else
  30. this.timer.Enabled = false;
  31. });
  32. }
  33. else
  34. {
  35. if (value == 1)
  36. this.timer.Enabled = true;
  37. else
  38. this.timer.Enabled = false;
  39. }
  40. }
  41. }
  42.  
  43. public int Timer
  44. {
  45. set
  46. {
  47. if (this.InvokeRequired)
  48. {
  49. this.Invoke((MethodInvoker)delegate
  50. {
  51. if (value == 1)
  52. this.timer.Enabled = true;
  53. else
  54. this.timer.Enabled = false;
  55. });
  56. }
  57. else
  58. {
  59. if (value == 1)
  60. this.timer.Enabled = true;
  61. else
  62. this.timer.Enabled = false;
  63. }
  64. }
  65. }
Add Comment
Please, Sign In to add comment