C# Class KFreonLib.Misc.Methods

Provides miscellaneous methods for general tools.
显示文件 Open project: ME3Explorer/ME3Explorer

Public Methods

Method Description
CheckGameState ( MEDirectories MEExDirecs, bool askIfNotFound, List &messages ) : List
DisplayYesNoDialogBox ( string message, string title ) : bool

Displays a Yes/No dialog box with customizable title and prompt. Returns true or false.

EnumerateGameFiles ( int GameVersion, List files, Predicate predicate = null ) : List
EnumerateGameFiles ( int GameVersion, string searchPath, bool recurse = true, Predicate predicate = null ) : List

Enumerates the given game folder using a filter.

FindInStack ( string FrameName ) : bool

Find a string in the stackframes. I use it to find calling functions.

GetDLCNameFromPath ( string path ) : string

Returns name of DLC if path is part of a DLC.

GetExecutingLoc ( ) : string

Returns path of executing program.

GetInstalledDLC ( string DLCBasePath ) : List
GetMEType ( ) : int

Returns which game has called this function. For use to figure out calling functions

GetNumCores ( ) : int

Gets number of processor cores without hyperthreading.

RunShell ( string cmd, string args ) : void

Runs commands in a shell. (WV's code I believe)

SelectGameLoc ( int GameVers ) : string

Gets user input to select a game exe.

SetGamePath ( int GameVers, string path ) : void

Sets the BIOGame path in the MEDirectory classes.

SetNumThreads ( bool User ) : int

Sets number of threads in a program.

Method Details

CheckGameState() public static method

public static CheckGameState ( MEDirectories MEExDirecs, bool askIfNotFound, List &messages ) : List
MEExDirecs KFreonLib.MEDirectories.MEDirectories
askIfNotFound bool
messages List
return List

DisplayYesNoDialogBox() public static method

Displays a Yes/No dialog box with customizable title and prompt. Returns true or false.
public static DisplayYesNoDialogBox ( string message, string title ) : bool
message string Message prompt to display.
title string Window title to use.
return bool

EnumerateGameFiles() public static method

public static EnumerateGameFiles ( int GameVersion, List files, Predicate predicate = null ) : List
GameVersion int
files List
predicate Predicate
return List

EnumerateGameFiles() public static method

Enumerates the given game folder using a filter.
public static EnumerateGameFiles ( int GameVersion, string searchPath, bool recurse = true, Predicate predicate = null ) : List
GameVersion int Version of game being searched.
searchPath string Path to search.
recurse bool
predicate Predicate
return List

FindInStack() public static method

Find a string in the stackframes. I use it to find calling functions.
public static FindInStack ( string FrameName ) : bool
FrameName string FrameName to find.
return bool

GetDLCNameFromPath() public static method

Returns name of DLC if path is part of a DLC.
public static GetDLCNameFromPath ( string path ) : string
path string Path to search for DLC names in.
return string

GetExecutingLoc() public static method

Returns path of executing program.
public static GetExecutingLoc ( ) : string
return string

GetInstalledDLC() public static method

public static GetInstalledDLC ( string DLCBasePath ) : List
DLCBasePath string
return List

GetMEType() public static method

Returns which game has called this function. For use to figure out calling functions
public static GetMEType ( ) : int
return int

GetNumCores() public static method

Gets number of processor cores without hyperthreading.
public static GetNumCores ( ) : int
return int

RunShell() public static method

Runs commands in a shell. (WV's code I believe)
public static RunShell ( string cmd, string args ) : void
cmd string Commands to run.
args string Arguments to give to commands.
return void

SelectGameLoc() public static method

Gets user input to select a game exe.
public static SelectGameLoc ( int GameVers ) : string
GameVers int Game to select.
return string

SetGamePath() public static method

Sets the BIOGame path in the MEDirectory classes.
public static SetGamePath ( int GameVers, string path ) : void
GameVers int Which game to set path of.
path string New BIOGame path.
return void

SetNumThreads() public static method

Sets number of threads in a program.
public static SetNumThreads ( bool User ) : int
User bool True if dialog required.
return int