Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Localization.cs @ 2645

Last change on this file since 2645 was 2645, checked in by mkommend, 14 years ago

extracted external libraries and adapted dependent plugins (ticket #837)

File size: 982 bytes
Line 
1using System;
2using System.ComponentModel;
3
4namespace WeifenLuo.WinFormsUI.Docking
5{
6  [AttributeUsage(AttributeTargets.All)]
7  internal sealed class LocalizedDescriptionAttribute : DescriptionAttribute
8  {
9    private bool m_initialized = false;
10
11    public LocalizedDescriptionAttribute(string key) : base(key)
12    {
13    }
14
15    public override string Description
16    {
17      get
18      {
19        if (!m_initialized)
20        {
21          string key = base.Description;
22          DescriptionValue = ResourceHelper.GetString(key);
23          if (DescriptionValue == null)
24            DescriptionValue = String.Empty;
25
26          m_initialized = true;
27        }
28
29        return DescriptionValue;
30      }
31    }
32  }
33
34  [AttributeUsage(AttributeTargets.All)]
35  internal sealed class LocalizedCategoryAttribute : CategoryAttribute
36  {
37    public LocalizedCategoryAttribute(string key) : base(key)
38    {
39    }
40
41    protected override string GetLocalizedString(string key)
42    {
43      return ResourceHelper.GetString(key);
44    }
45  }
46}
Note: See TracBrowser for help on using the repository browser.