C# Class ICSharpCode.Core.ResourceService

Compatibility class; forwards calls to the IResourceService. TODO: Remove
Exibir arquivo Open project: jumpinjackie/fdotoolbox Class Usage Examples

Public Methods

Method Description
GetBitmap ( string name ) : Bitmap

Returns a bitmap from the resource database, it handles localization transparent for the user.

GetIcon ( string name ) : Icon

Returns a icon from the resource database, it handles localization transparent for the user. In the resource database can be a bitmap instead of an icon in the dabase. It is converted automatically.

GetString ( string name ) : string

Returns a string from the resource database, it handles localization transparent for the user.

GetStringFormatted ( string name ) : string

Returns a format string from the resource database, the string in the localized resource database must be a format string.

InitializeService ( string resourceDirectory ) : void
LoadDefaultMonospacedFont ( FontStyle style ) : Font

Loads the default monospaced font (Consolas or Courier New).

LoadFont ( Font baseFont, FontStyle newStyle ) : Font

The LoadFont routines provide a safe way to load fonts.

LoadFont ( string fontName, int size ) : Font

The LoadFont routines provide a safe way to load fonts.

LoadFont ( string fontName, int size, FontStyle style ) : Font

The LoadFont routines provide a safe way to load fonts.

LoadFont ( string fontName, int size, FontStyle style, GraphicsUnit unit ) : Font

The LoadFont routines provide a safe way to load fonts.

LoadFont ( string fontName, int size, GraphicsUnit unit ) : Font

The LoadFont routines provide a safe way to load fonts.

RegisterImages ( string baseResourceName, Assembly assembly ) : void

Registers image resources in the resource service.

RegisterNeutralImages ( ResourceManager imageManager ) : void
RegisterNeutralStrings ( ResourceManager stringManager ) : void
RegisterStrings ( string baseResourceName, Assembly assembly ) : void

Registers string resources in the resource service.

Private Methods

Method Description
GetImageResource ( string name ) : object
Load ( string fileName ) : Hashtable
Load ( string name, string language ) : Hashtable
LoadLanguageResources ( string language ) : void
OnPropertyChange ( object sender, PropertyChangedEventArgs e ) : void

Method Details

GetBitmap() public static method

Returns a bitmap from the resource database, it handles localization transparent for the user.
/// Is thrown when the GlobalResource manager can't find a requested resource. ///
public static GetBitmap ( string name ) : Bitmap
name string /// The name of the requested bitmap. ///
return Bitmap

GetIcon() public static method

Returns a icon from the resource database, it handles localization transparent for the user. In the resource database can be a bitmap instead of an icon in the dabase. It is converted automatically.
public static GetIcon ( string name ) : Icon
name string /// The name of the requested icon. ///
return Icon

GetString() public static method

Returns a string from the resource database, it handles localization transparent for the user.
/// Is thrown when the GlobalResource manager can't find a requested resource. ///
public static GetString ( string name ) : string
name string /// The name of the requested resource. ///
return string

GetStringFormatted() public static method

Returns a format string from the resource database, the string in the localized resource database must be a format string.
public static GetStringFormatted ( string name ) : string
name string /// The name of the requested resource. ///
return string

InitializeService() public static method

public static InitializeService ( string resourceDirectory ) : void
resourceDirectory string
return void

LoadDefaultMonospacedFont() public static method

Loads the default monospaced font (Consolas or Courier New).
public static LoadDefaultMonospacedFont ( FontStyle style ) : Font
style FontStyle
return Font

LoadFont() public static method

The LoadFont routines provide a safe way to load fonts.
public static LoadFont ( Font baseFont, FontStyle newStyle ) : Font
baseFont Font The existing font from which to create the new font.
newStyle FontStyle The new style of the font.
return Font

LoadFont() public static method

The LoadFont routines provide a safe way to load fonts.
public static LoadFont ( string fontName, int size ) : Font
fontName string The name of the font to load.
size int The size of the font to load.
return Font

LoadFont() public static method

The LoadFont routines provide a safe way to load fonts.
public static LoadFont ( string fontName, int size, FontStyle style ) : Font
fontName string The name of the font to load.
size int The size of the font to load.
style FontStyle The of the font
return Font

LoadFont() public static method

The LoadFont routines provide a safe way to load fonts.
public static LoadFont ( string fontName, int size, FontStyle style, GraphicsUnit unit ) : Font
fontName string The name of the font to load.
size int The size of the font to load.
style FontStyle The of the font
unit GraphicsUnit The of the font
return Font

LoadFont() public static method

The LoadFont routines provide a safe way to load fonts.
public static LoadFont ( string fontName, int size, GraphicsUnit unit ) : Font
fontName string The name of the font to load.
size int The size of the font to load.
unit GraphicsUnit The of the font
return Font

RegisterImages() public static method

Registers image resources in the resource service.
public static RegisterImages ( string baseResourceName, Assembly assembly ) : void
baseResourceName string The base name of the resource file embedded in the assembly.
assembly System.Reflection.Assembly The assembly which contains the resource file.
return void

RegisterNeutralImages() public static method

public static RegisterNeutralImages ( ResourceManager imageManager ) : void
imageManager System.Resources.ResourceManager
return void

RegisterNeutralStrings() public static method

public static RegisterNeutralStrings ( ResourceManager stringManager ) : void
stringManager System.Resources.ResourceManager
return void

RegisterStrings() public static method

Registers string resources in the resource service.
public static RegisterStrings ( string baseResourceName, Assembly assembly ) : void
baseResourceName string The base name of the resource file embedded in the assembly.
assembly System.Reflection.Assembly The assembly which contains the resource file.
return void