SRDescriptionAttribute.cs 647 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // System.Drawing.SRDescriptionAttribute.cs
  3. //
  4. // Authors:
  5. // Andreas Nahr ([email protected])
  6. //
  7. // (C) 2004 Andreas Nahr
  8. //
  9. using System;
  10. using System.ComponentModel;
  11. namespace System.Drawing
  12. {
  13. [AttributeUsage(AttributeTargets.All)]
  14. internal class SRDescriptionAttribute : DescriptionAttribute
  15. {
  16. private bool isReplaced = false;
  17. public SRDescriptionAttribute (string description)
  18. : base (description)
  19. {
  20. }
  21. public override string Description {
  22. get {
  23. if (!isReplaced) {
  24. isReplaced = true;
  25. DescriptionValue = Locale.GetText (DescriptionValue);
  26. }
  27. return DescriptionValue;
  28. }
  29. }
  30. }
  31. }