SRDescriptionAttribute.cs 718 B

1234567891011121314151617181920212223242526
  1. // 2012-10-25 add by chenxy
  2. using System;
  3. using System.ComponentModel;
  4. namespace Dongke.WinForm.Controls.InvoiceLayout
  5. {
  6. [AttributeUsage(AttributeTargets.All)]
  7. internal sealed class SRDescriptionAttribute : DescriptionAttribute
  8. {
  9. private bool replaced;
  10. public override string Description
  11. {
  12. get
  13. {
  14. if (!this.replaced)
  15. {
  16. this.replaced = true;
  17. base.DescriptionValue = SR.GetString(base.Description);
  18. }
  19. return base.Description;
  20. }
  21. }
  22. public SRDescriptionAttribute(string description) : base(description)
  23. {
  24. }
  25. }
  26. }