C# Class ICSharpCode.Core.ResourceService

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

Méthodes publiques

Méthode 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

Méthode 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 méthode

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. ///
Résultat Bitmap

GetIcon() public static méthode

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. ///
Résultat Icon

GetString() public static méthode

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. ///
Résultat string

GetStringFormatted() public static méthode

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. ///
Résultat string

InitializeService() public static méthode

public static InitializeService ( string resourceDirectory ) : void
resourceDirectory string
Résultat void

LoadDefaultMonospacedFont() public static méthode

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

LoadFont() public static méthode

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.
Résultat Font

LoadFont() public static méthode

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.
Résultat Font

LoadFont() public static méthode

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
Résultat Font

LoadFont() public static méthode

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
Résultat Font

LoadFont() public static méthode

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
Résultat Font

RegisterImages() public static méthode

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.
Résultat void

RegisterNeutralImages() public static méthode

public static RegisterNeutralImages ( ResourceManager imageManager ) : void
imageManager System.Resources.ResourceManager
Résultat void

RegisterNeutralStrings() public static méthode

public static RegisterNeutralStrings ( ResourceManager stringManager ) : void
stringManager System.Resources.ResourceManager
Résultat void

RegisterStrings() public static méthode

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.
Résultat void