| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /*******************************************************************************
- * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:LocalizedDescriptionAttribute.cs
- * 2.功能描述:类文件
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 陈晓野 2014/09/01 1.00 新建
- *******************************************************************************/
- using System;
- using System.ComponentModel;
- namespace Dongke.IBOSS.PRD.Basics.DockPanel
- {
- [AttributeUsage(AttributeTargets.All)]
- internal sealed class LocalizedDescriptionAttribute : DescriptionAttribute
- {
- private bool m_initialized = false;
- public LocalizedDescriptionAttribute(string key)
- : base(key)
- {
- }
- public override string Description
- {
- get
- {
- if (!m_initialized)
- {
- string key = base.Description;
- DescriptionValue = ResourceHelper.GetString(key);
- if (DescriptionValue == null)
- DescriptionValue = String.Empty;
- m_initialized = true;
- }
- return DescriptionValue;
- }
- }
- }
- [AttributeUsage(AttributeTargets.All)]
- internal sealed class LocalizedCategoryAttribute : CategoryAttribute
- {
- public LocalizedCategoryAttribute(string key)
- : base(key)
- {
- }
- protected override string GetLocalizedString(string key)
- {
- return ResourceHelper.GetString(key);
- }
- }
- }
|