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.
Exibir arquivo Open project: borisblizzard/arcreator

Public Methods

Method 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

Method 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 method

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

EnableLocalDirectory() public static method

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

GetFullPath() public static method

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
return string

GetTypes() public static method

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
return List

Initialize() public static method

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

RefreshLocal() public static method

Refreshes the collection of local resources
public static RefreshLocal ( ) : void
return void

RefreshRTP() public static method

Refreshes the collection of RTP resources
public static RefreshRTP ( ) : void
return void