TaskButton.cs 1.4 KB

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