localization.cs
来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 57 行
CS
57 行
// *****************************************************************************
//
// Copyright 2004, Weifen Luo
// All rights reserved. The software and associated documentation
// supplied hereunder are the proprietary information of Weifen Luo
// and are supplied subject to licence terms.
//
// WinFormsUI Library Version 1.0
// *****************************************************************************
using System;
using System.ComponentModel;
namespace WeifenLuo.WinFormsUI
{
[AttributeUsage(AttributeTargets.All)]
internal 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 class LocalizedCategoryAttribute : CategoryAttribute
{
public LocalizedCategoryAttribute(string key) : base(key)
{
}
protected override string GetLocalizedString(string key)
{
return ResourceHelper.GetString(key);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?