Files
cuetools.net/CUETools.Codecs/Local.cs
chudov 64ddb2cf31 * CUERipper: was still sometimes locking drives it didn't need to
* ArCueDotNet: don't search for cover art
* 'Silent track' diagnostics in AR log
* LAME.dll: settings were not used
* libwavpack: settings were not used (MD5Sum & extra mode)
* workarounds for various Mono bugs
* Path formatting: %discnumber% produces two-digit numbers if %totaldiscs% > 9
* Overwrite dialog: list files, 'remember the choice' option
* Doesn't abort on broken Artwork files
* Better locates files in some complicated cases, e.g. when only some tracks have tracknumber tags
* Folder browser now sorts contents, because OS didn't do it when browsing external drives etc
2010-06-11 17:54:37 +00:00

59 lines
1.4 KiB
C#

using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
namespace CUETools.Codecs
{
/// <summary>
/// Localized description attribute
/// </summary>
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)]
public class SRDescriptionAttribute : DescriptionAttribute
{
/// <summary>
/// Construct the description attribute
/// </summary>
/// <param name="text"></param>
public SRDescriptionAttribute(Type SR, string text)
: base(text)
{
this.localized = false;
this.SR = SR;
}
/// <summary>
/// Override the return of the description text to localize the text
/// </summary>
public override string Description
{
get
{
if (!localized)
{
localized = true;
this.DescriptionValue = SR.InvokeMember(
this.DescriptionValue,
System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.Static |
System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic,
null,
null,
new object[] { }) as string;
}
return base.Description;
}
}
/// <summary>
/// Store a flag indicating whether this has been localized
/// </summary>
private bool localized;
/// <summary>
/// Resource manager to use;
/// </summary>
private Type SR;
}
}