mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
c38affcded
* All renderdoc code up to this point was written by me, history is available by request
47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
|
|
namespace WeifenLuo.WinFormsUI.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);
|
|
}
|
|
}
|
|
}
|