C# Class SharpBoot.Utils

Show file Open project: zdimension/SharpBoot

Public Properties

Property Type Description
CurrentRandom System.Random

Public Methods

Method Description
AddRecommended ( this arr, int recIndex ) : List
AddRecommended ( this arr, int recIndex ) : string[]
CRC32 ( byte ct ) : string
CRC32 ( string ct ) : string
DownloadWithoutCache ( string url, bool redl = true ) : string
DrawFilledRectangle ( int w, int h, Color c ) : Bitmap
FileHash ( string fileName, string hash ) : string
FileMD5 ( string fileName ) : string
FileSHA1 ( string fileName ) : string
FileSHA256 ( string fileName ) : string
FileSHA384 ( string fileName ) : string
FileSHA512 ( string fileName ) : string
FormatDrive ( string driveLetter, string fileSystem = "NTFS", bool quickFormat = true, int clusterSize = 8192, string label = "SHARPBOOT", bool enableCompression = false ) : uint
FormatEx ( this s ) : string
GetFlag ( string twocode ) : Image
GetPhysicalPath ( string letter ) : string
InstallMBR ( string l, byte theMbr ) : void
IsExternalDisk ( string driveLetter ) : bool
MakeURLRandom ( string url ) : string
RandomString ( int Size ) : string
RemoveRecommended ( this s ) : string
ToByteArray ( this img ) : byte[]
Wrap ( this text, int maxLength ) : List

Private Methods

Method Description
CreateFile ( [ fileName, uint fileAccess, uint fileShare, IntPtr securityAttributes, uint creationDisposition, uint flags, IntPtr template ) : SafeFileHandle
DeviceIoControl ( IntPtr hDevice, uint dwIoControlCode, IntPtr lpInBuffer, uint nInBufferSize, IntPtr lpOutBuffer, uint nOutBufferSize, uint &lpBytesReturned, IntPtr lpOverlapped ) : bool
QueryDosDevice ( string DeviceName, IntPtr TargetPath, UInt32 ucchMax ) : UInt32
SetWindowTheme ( IntPtr hwnd, string pszSubAppName, string pszSubIdList ) : int

Method Details

AddRecommended() public static method

public static AddRecommended ( this arr, int recIndex ) : List
arr this
recIndex int
return List

AddRecommended() public static method

public static AddRecommended ( this arr, int recIndex ) : string[]
arr this
recIndex int
return string[]

CRC32() public static method

public static CRC32 ( byte ct ) : string
ct byte
return string

CRC32() public static method

public static CRC32 ( string ct ) : string
ct string
return string

DownloadWithoutCache() public static method

public static DownloadWithoutCache ( string url, bool redl = true ) : string
url string
redl bool
return string

DrawFilledRectangle() public static method

public static DrawFilledRectangle ( int w, int h, Color c ) : Bitmap
w int
h int
c Color
return System.Drawing.Bitmap

FileHash() public static method

public static FileHash ( string fileName, string hash ) : string
fileName string
hash string
return string

FileMD5() public static method

public static FileMD5 ( string fileName ) : string
fileName string
return string

FileSHA1() public static method

public static FileSHA1 ( string fileName ) : string
fileName string
return string

FileSHA256() public static method

public static FileSHA256 ( string fileName ) : string
fileName string
return string

FileSHA384() public static method

public static FileSHA384 ( string fileName ) : string
fileName string
return string

FileSHA512() public static method

public static FileSHA512 ( string fileName ) : string
fileName string
return string

FormatDrive() public static method

public static FormatDrive ( string driveLetter, string fileSystem = "NTFS", bool quickFormat = true, int clusterSize = 8192, string label = "SHARPBOOT", bool enableCompression = false ) : uint
driveLetter string
fileSystem string
quickFormat bool
clusterSize int
label string
enableCompression bool
return uint

FormatEx() public static method

public static FormatEx ( this s ) : string
s this
return string

GetFlag() public static method

public static GetFlag ( string twocode ) : Image
twocode string
return Image

GetPhysicalPath() public static method

public static GetPhysicalPath ( string letter ) : string
letter string
return string

InstallMBR() public static method

public static InstallMBR ( string l, byte theMbr ) : void
l string
theMbr byte
return void

IsExternalDisk() public static method

public static IsExternalDisk ( string driveLetter ) : bool
driveLetter string
return bool

MakeURLRandom() public static method

public static MakeURLRandom ( string url ) : string
url string
return string

RandomString() public static method

public static RandomString ( int Size ) : string
Size int
return string

RemoveRecommended() public static method

public static RemoveRecommended ( this s ) : string
s this
return string

ToByteArray() public static method

public static ToByteArray ( this img ) : byte[]
img this
return byte[]

Wrap() public static method

public static Wrap ( this text, int maxLength ) : List
text this
maxLength int
return List

Property Details

CurrentRandom public static property

public static Random,System CurrentRandom
return System.Random