Make structural changes to repository
Modernizes the repository
This commit is contained in:
parent
a67593b58f
commit
7f7f8970bc
412 changed files with 72437 additions and 155552 deletions
46
source/Docking/Localization.cs
Normal file
46
source/Docking/Localization.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace LSLEditor.Docking
|
||||
{
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue