C# Класс KFreonLib.Misc.Methods

Provides miscellaneous methods for general tools.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

CheckGameState() публичный статический Метод

public static CheckGameState ( MEDirectories MEExDirecs, bool askIfNotFound, List &messages ) : List
MEExDirecs KFreonLib.MEDirectories.MEDirectories
askIfNotFound bool
messages List
Результат List

DisplayYesNoDialogBox() публичный статический Метод

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.
Результат bool

EnumerateGameFiles() публичный статический Метод

public static EnumerateGameFiles ( int GameVersion, List files, Predicate predicate = null ) : List
GameVersion int
files List
predicate Predicate
Результат List

EnumerateGameFiles() публичный статический Метод

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
Результат List

FindInStack() публичный статический Метод

Find a string in the stackframes. I use it to find calling functions.
public static FindInStack ( string FrameName ) : bool
FrameName string FrameName to find.
Результат bool

GetDLCNameFromPath() публичный статический Метод

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.
Результат string

GetExecutingLoc() публичный статический Метод

Returns path of executing program.
public static GetExecutingLoc ( ) : string
Результат string

GetInstalledDLC() публичный статический Метод

public static GetInstalledDLC ( string DLCBasePath ) : List
DLCBasePath string
Результат List

GetMEType() публичный статический Метод

Returns which game has called this function. For use to figure out calling functions
public static GetMEType ( ) : int
Результат int

GetNumCores() публичный статический Метод

Gets number of processor cores without hyperthreading.
public static GetNumCores ( ) : int
Результат int

RunShell() публичный статический Метод

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.
Результат void

SelectGameLoc() публичный статический Метод

Gets user input to select a game exe.
public static SelectGameLoc ( int GameVers ) : string
GameVers int Game to select.
Результат string

SetGamePath() публичный статический Метод

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.
Результат void

SetNumThreads() публичный статический Метод

Sets number of threads in a program.
public static SetNumThreads ( bool User ) : int
User bool True if dialog required.
Результат int