TaskButton.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using Resources;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Drawing;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace SmartCoalApplication.Core
  9. {
  10. public sealed class TaskButton
  11. {
  12. private static TaskButton cancel = null;
  13. public static TaskButton Cancel
  14. {
  15. get
  16. {
  17. if (cancel == null)
  18. {
  19. cancel = new TaskButton(
  20. PdnResources.GetImageResource("Icons.CancelIcon.png").Reference,
  21. PdnResources.GetString("TaskButton.Cancel.ActionText"),
  22. PdnResources.GetString("TaskButton.Cancel.ExplanationText"));
  23. }
  24. return cancel;
  25. }
  26. }
  27. private Image image;
  28. private string actionText;
  29. private string explanationText;
  30. public Image Image
  31. {
  32. get
  33. {
  34. return this.image;
  35. }
  36. }
  37. public string ActionText
  38. {
  39. get
  40. {
  41. return this.actionText;
  42. }
  43. }
  44. public string ExplanationText
  45. {
  46. get
  47. {
  48. return this.explanationText;
  49. }
  50. }
  51. public TaskButton(Image image, string actionText, string explanationText)
  52. {
  53. this.image = image;
  54. this.actionText = actionText;
  55. this.explanationText = explanationText;
  56. }
  57. }
  58. }