C# Class ARCed.Helpers.ResourceHelper

Static class that handles finding, organizing, and getting resources automatically from both ther local directory and installed RTP directory if there is one.
Afficher le fichier Open project: borisblizzard/arcreator

Méthodes publiques

Méthode Description
DirectorySearch ( string rootDir ) : List

Recursively searches a directory for filenames using the given filters

EnableLocalDirectory ( bool enable ) : void

Enables/disables local directory searching

GetFullPath ( string folder, string name ) : string

Gets the full path to a file of the given type using the simple name of the file

GetTypes ( string folder ) : List

Finds all resources that can be found in the given relative path

Initialize ( ) : void

Initializes the system. Must be called before system can be used.

RefreshLocal ( ) : void

Refreshes the collection of local resources

RefreshRTP ( ) : void

Refreshes the collection of RTP resources

Private Methods

Méthode Description
FileSystemWatcherCreated ( object sender, FileSystemEventArgs e ) : void

Event raised when a file resource file is created

FileSystemWatcherDeleted ( object sender, FileSystemEventArgs e ) : void

Event raised when a file resource file is deleted

FileSystemWatcherRenamed ( object sender, RenamedEventArgs e ) : void

Event raised when a file resource file is renamed

Method Details

DirectorySearch() public static méthode

Recursively searches a directory for filenames using the given filters
public static DirectorySearch ( string rootDir ) : List
rootDir string Root directory to begin search
Résultat List

EnableLocalDirectory() public static méthode

Enables/disables local directory searching
public static EnableLocalDirectory ( bool enable ) : void
enable bool Flag to enable or disable local searching
Résultat void

GetFullPath() public static méthode

Gets the full path to a file of the given type using the simple name of the file
public static GetFullPath ( string folder, string name ) : string
folder string Folder name where the file to be found is located.
name string Simple name of the file, without extension
Résultat string

GetTypes() public static méthode

Finds all resources that can be found in the given relative path
public static GetTypes ( string folder ) : List
folder string Directory that will be searched. This path must be relative to /// both the project and the root directory of the RTP
Résultat List

Initialize() public static méthode

Initializes the system. Must be called before system can be used.
public static Initialize ( ) : void
Résultat void

RefreshLocal() public static méthode

Refreshes the collection of local resources
public static RefreshLocal ( ) : void
Résultat void

RefreshRTP() public static méthode

Refreshes the collection of RTP resources
public static RefreshRTP ( ) : void
Résultat void