C# Class SIL.FieldWorks.Resources.ResourceHelper

Provides access to resources
The non-static methods and fields are in a separate class so that clients can use this class without the need for a reference to Windows.Forms if all they need is to get some strings.
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Свойство Type Description
ResourceHelper System

Méthodes publiques

Méthode Description
BuildFileFilter ( ) : string

Builds a filter specification for multiple file types for a SaveFileDialog or OpenFileDialog.

BuildFileFilter ( IEnumerable types ) : string

Builds a filter specification for multiple file types for a SaveFileDialog or OpenFileDialog.

FileFilter ( FileFilterType type ) : string

Builds a filter specification for a single file type for SaveFileDialog or OpenFileDialog.

FormatResourceString ( string stid ) : string

Return a string from a resource ID, with formatting placeholders replaced by the supplied parameters.

GetHelpString ( string stid ) : string

Return a help topic or help file path.

GetResourceString ( string stid ) : string

Return a string from a resource ID.

MakeUndoRedoLabels ( string stid, string &stUndo, string &stRedo ) : void

Function to create appropriate labels for Undo tasks, with the action names coming from the stid.

ReplaceTransparentColor ( Image img, Color replaceColor ) : Bitmap

Replace all of the transparent pixels in the image with the given color

ShutdownHelper ( ) : void

Shut down the one instance of ResourceHelper.

This should be called once when the application shuts down.

Private Methods

Méthode Description
ResourceHelper ( ) : System

Constructor for ResourceHelper

Method Details

BuildFileFilter() public static méthode

Builds a filter specification for multiple file types for a SaveFileDialog or OpenFileDialog.
public static BuildFileFilter ( ) : string
Résultat string

BuildFileFilter() public static méthode

Builds a filter specification for multiple file types for a SaveFileDialog or OpenFileDialog.
public static BuildFileFilter ( IEnumerable types ) : string
types IEnumerable The types of files to include in the filter, in the order they /// should be included. Do not use any of the enumeration values starting with "All" /// for a filter intended to be used in a SaveFileDialog.
Résultat string

FileFilter() public static méthode

Builds a filter specification for a single file type for SaveFileDialog or OpenFileDialog.
public static FileFilter ( FileFilterType type ) : string
type FileFilterType The type of files to include in the filter. Do not use any of the /// enumeration values starting with "All" for a filter intended to be used in a /// SaveFileDialog.
Résultat string

FormatResourceString() static public méthode

Return a string from a resource ID, with formatting placeholders replaced by the supplied parameters.
static public FormatResourceString ( string stid ) : string
stid string String resource id
Résultat string

GetHelpString() static public méthode

Return a help topic or help file path.
static public GetHelpString ( string stid ) : string
stid string String resource id
Résultat string

GetResourceString() static public méthode

Return a string from a resource ID.
static public GetResourceString ( string stid ) : string
stid string String resource id
Résultat string

MakeUndoRedoLabels() public static méthode

Function to create appropriate labels for Undo tasks, with the action names coming from the stid.
public static MakeUndoRedoLabels ( string stid, string &stUndo, string &stRedo ) : void
stid string String resource id
stUndo string Returns string for Undo task
stRedo string Returns string for Redo task
Résultat void

ReplaceTransparentColor() public static méthode

Replace all of the transparent pixels in the image with the given color
public static ReplaceTransparentColor ( Image img, Color replaceColor ) : Bitmap
img Image
replaceColor Color
Résultat System.Drawing.Bitmap

ShutdownHelper() public static méthode

Shut down the one instance of ResourceHelper.
This should be called once when the application shuts down.
public static ShutdownHelper ( ) : void
Résultat void