Free cookie consent management tool by TermsFeed Policy Generator

source: branches/crossvalidation-2434/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.7.0/WinFormsUI-2.7.0/Docking/Localization.cs @ 13825

Last change on this file since 13825 was 8616, checked in by mkommend, 12 years ago

#1939: Added DockPanelSuite 2.7.0 to ExtLibs.

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.