C# Class ShowLib.Fcn

Show file Open project: evandrojr/CloudRaid

Public Methods

Method Description
AdministratorPermissionsCheck ( String SystemDir, String PrgFilesDir ) : System.Boolean

Checks wheater the application is running with administrator rights

CommandExecute ( string program, string arguments, string workingDirectory, int timeoutMinutes ) : string
CommandExecute ( string program, string arguments, string workingDirectory ) : void

Executes shell commands

CommandLineExecute ( string program, string arguments, string &standardOutputMessage, string &standardErrorMessage, string workingDirectory ) : int

Executes shell commands

CommandLineExecute ( string program, string arguments, string workingDirectory ) : string

Executes shell commands deprecated

CommandLineExecuteInBackground ( string program, string arguments, string workingDirectory ) : void

Executes shell commands in background

CommandLineVerboseExecute ( string program, string arguments, string &standardOutputMessage, string &standardErrorMessage, string workingDirectory ) : int

Executes shell commands

CommandLineVerboseExecute ( string program, string arguments, string workingDirectory ) : string

Executes shell commands deprecated

DirectoryCopy ( string srcDir, string trgDir ) : void
DirectoryGetFilesRecursive ( string b ) : List

Gera uma lista lista dos arquivos contidos num determinado diretório

FileBaseName ( string FileName ) : string

Retira a extnsão do nome do arquivo

FileName ( string pathAndFileName ) : string

Extrai o nome de um arquivo do caminho informado

FilePath ( string pathAndFileName ) : string

Extrai o caminho do arquivo informado. Deve ser informado o caminho completo do arquivo

MD5 ( string input ) : string
MyApplicationIsAlreadyIsRunning ( string name ) : bool

Find if your application is already running (needs you application process name)

ProcessAllInstancesFindAndKill ( string name ) : bool

Kill all the processes that matches the begining of the name

ProcessAllInstancesFindAndKillBeginingWith ( string name ) : bool

Kill all the processes that matches the begining of the name

ProcessFind ( string name ) : bool

Find if there is a process running that starts with the same name

ProcessFindBeginingWith ( string name ) : bool

Find if there is a process running that starts with the same name

RarFileDecompress ( string file, string rarExecutableDir ) : bool

Descompacta para o mesmo diretório que estiver o arquivo compactado. Deve ser passado o diretório onde estar o executável do RAR

TimestampToPath ( DateTime dt ) : string

Method Details

AdministratorPermissionsCheck() public static method

Checks wheater the application is running with administrator rights
public static AdministratorPermissionsCheck ( String SystemDir, String PrgFilesDir ) : System.Boolean
SystemDir String
PrgFilesDir String
return System.Boolean

CommandExecute() public static method

public static CommandExecute ( string program, string arguments, string workingDirectory, int timeoutMinutes ) : string
program string
arguments string
workingDirectory string
timeoutMinutes int
return string

CommandExecute() public static method

Executes shell commands
public static CommandExecute ( string program, string arguments, string workingDirectory ) : void
program string
arguments string
workingDirectory string
return void

CommandLineExecute() public static method

Executes shell commands
public static CommandLineExecute ( string program, string arguments, string &standardOutputMessage, string &standardErrorMessage, string workingDirectory ) : int
program string Programa a ser chamado pela linha de comando
arguments string Conjunto de argumentos
standardOutputMessage string Mensagem de saída
standardErrorMessage string Mensagem de erro
workingDirectory string Diretório de trabalho
return int

CommandLineExecute() public static method

Executes shell commands deprecated
public static CommandLineExecute ( string program, string arguments, string workingDirectory ) : string
program string Programa a ser chamado pela linha de comando
arguments string Conjunto de argumentos
workingDirectory string Diretório de trabalho
return string

CommandLineExecuteInBackground() public static method

Executes shell commands in background
public static CommandLineExecuteInBackground ( string program, string arguments, string workingDirectory ) : void
program string
arguments string
workingDirectory string
return void

CommandLineVerboseExecute() public static method

Executes shell commands
public static CommandLineVerboseExecute ( string program, string arguments, string &standardOutputMessage, string &standardErrorMessage, string workingDirectory ) : int
program string Programa a ser chamado pela linha de comando
arguments string Conjunto de argumentos
standardOutputMessage string Mensagem de saída
standardErrorMessage string Mensagem de erro
workingDirectory string Diretório de trabalho
return int

CommandLineVerboseExecute() public static method

Executes shell commands deprecated
public static CommandLineVerboseExecute ( string program, string arguments, string workingDirectory ) : string
program string
arguments string
workingDirectory string
return string

DirectoryCopy() public static method

public static DirectoryCopy ( string srcDir, string trgDir ) : void
srcDir string
trgDir string
return void

DirectoryGetFilesRecursive() public static method

Gera uma lista lista dos arquivos contidos num determinado diretório
public static DirectoryGetFilesRecursive ( string b ) : List
b string Caminho do diretório desejado
return List

FileBaseName() public static method

Retira a extnsão do nome do arquivo
public static FileBaseName ( string FileName ) : string
FileName string Nome do arquivo
return string

FileName() public static method

Extrai o nome de um arquivo do caminho informado
public static FileName ( string pathAndFileName ) : string
pathAndFileName string Caminho do arquivo
return string

FilePath() public static method

Extrai o caminho do arquivo informado. Deve ser informado o caminho completo do arquivo
public static FilePath ( string pathAndFileName ) : string
pathAndFileName string Caminho completo do arquivo
return string

MD5() public static method

public static MD5 ( string input ) : string
input string
return string

MyApplicationIsAlreadyIsRunning() public static method

Find if your application is already running (needs you application process name)
public static MyApplicationIsAlreadyIsRunning ( string name ) : bool
name string
return bool

ProcessAllInstancesFindAndKill() public static method

Kill all the processes that matches the begining of the name
public static ProcessAllInstancesFindAndKill ( string name ) : bool
name string
return bool

ProcessAllInstancesFindAndKillBeginingWith() public static method

Kill all the processes that matches the begining of the name
public static ProcessAllInstancesFindAndKillBeginingWith ( string name ) : bool
name string
return bool

ProcessFind() public static method

Find if there is a process running that starts with the same name
public static ProcessFind ( string name ) : bool
name string
return bool

ProcessFindBeginingWith() public static method

Find if there is a process running that starts with the same name
public static ProcessFindBeginingWith ( string name ) : bool
name string
return bool

RarFileDecompress() public static method

Descompacta para o mesmo diretório que estiver o arquivo compactado. Deve ser passado o diretório onde estar o executável do RAR
public static RarFileDecompress ( string file, string rarExecutableDir ) : bool
file string File to be decompressed
rarExecutableDir string Directory where lies the rar.exe
return bool

TimestampToPath() public static method

public static TimestampToPath ( DateTime dt ) : string
dt DateTime
return string