C# 클래스 FileDownloaderApp.FileDownloader

Class for downloading files in the background that supports info about their progress, the total progress, cancellation, pausing, and resuming. The downloads will run on a separate thread so you don't have to worry about multihreading yourself.
Class FileDownloader v1.0.2, by De Dauw Jeroen - April 2009
상속: System.Object, IDisposable
파일 보기 프로젝트 열기: polserver/poltools 1 사용 예제들

공개 메소드들

메소드 설명
CurrentFilePercentage ( ) : Double

Gets the percentage of the current file progress

CurrentFilePercentage ( Int32 decimals ) : Double

Gets the percentage of the current file progress

Dispose ( ) : void
FileDownloader ( ) : System

Create a new instance of a FileDownloader

FileDownloader ( System.Boolean supportsProgress ) : System

Create a new instance of a FileDownloader

FormatSizeBinary ( System.Int64 size ) : string

Format an amount of bytes to a more readible notation with binary notation symbols

FormatSizeBinary ( System.Int64 size, Int32 decimals ) : string

Format an amount of bytes to a more readible notation with binary notation symbols

FormatSizeDecimal ( System.Int64 size ) : string

Format an amount of bytes to a more readible notation with decimal notation symbols

FormatSizeDecimal ( System.Int64 size, Int32 decimals ) : string

Format an amount of bytes to a more readible notation with decimal notation symbols

Pause ( ) : void
Resume ( ) : void
Start ( ) : void
Stop ( ) : void
Stop ( System.Boolean deleteCompletedFiles ) : void
TotalPercentage ( ) : Double

Gets the total download percentage. Only avaible when the FileDownloader suports progress

TotalPercentage ( Int32 decimals ) : Double

Gets the total download percentage. Only avaible when the FileDownloader suports progress

보호된 메소드들

메소드 설명
Dispose ( System.Boolean disposing ) : void

비공개 메소드들

메소드 설명
bgwDownloader_DoWork ( object sender, DoWorkEventArgs e ) : void
bgwDownloader_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
bgwDownloader_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
calculateFilesSize ( ) : void
cleanUpFiles ( Int32 start, Int32 length ) : void
downloadFile ( Int32 fileNr ) : void
fireEventFromBgw ( Event eventName ) : void
initizalize ( System.Boolean supportsProgress ) : void

메소드 상세

CurrentFilePercentage() 공개 메소드

Gets the percentage of the current file progress
public CurrentFilePercentage ( ) : Double
리턴 Double

CurrentFilePercentage() 공개 메소드

Gets the percentage of the current file progress
public CurrentFilePercentage ( Int32 decimals ) : Double
decimals System.Int32
리턴 Double

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( System.Boolean disposing ) : void
disposing System.Boolean
리턴 void

FileDownloader() 공개 메소드

Create a new instance of a FileDownloader
public FileDownloader ( ) : System
리턴 System

FileDownloader() 공개 메소드

Create a new instance of a FileDownloader
public FileDownloader ( System.Boolean supportsProgress ) : System
supportsProgress System.Boolean Optional. Boolean. Should the FileDownloader support total progress statistics?
리턴 System

FormatSizeBinary() 공개 정적인 메소드

Format an amount of bytes to a more readible notation with binary notation symbols
public static FormatSizeBinary ( System.Int64 size ) : string
size System.Int64 Required. Int64. The raw amount of bytes
리턴 string

FormatSizeBinary() 공개 정적인 메소드

Format an amount of bytes to a more readible notation with binary notation symbols
public static FormatSizeBinary ( System.Int64 size, Int32 decimals ) : string
size System.Int64 Required. Int64. The raw amount of bytes
decimals System.Int32 Optional. Int32. The amount of decimals you want to have displayed in the notation
리턴 string

FormatSizeDecimal() 공개 정적인 메소드

Format an amount of bytes to a more readible notation with decimal notation symbols
public static FormatSizeDecimal ( System.Int64 size ) : string
size System.Int64 Required. Int64. The raw amount of bytes
리턴 string

FormatSizeDecimal() 공개 정적인 메소드

Format an amount of bytes to a more readible notation with decimal notation symbols
public static FormatSizeDecimal ( System.Int64 size, Int32 decimals ) : string
size System.Int64 Required. Int64. The raw amount of bytes
decimals System.Int32 Optional. Int32. The amount of decimals you want to have displayed in the notation
리턴 string

Pause() 공개 메소드

public Pause ( ) : void
리턴 void

Resume() 공개 메소드

public Resume ( ) : void
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( System.Boolean deleteCompletedFiles ) : void
deleteCompletedFiles System.Boolean
리턴 void

TotalPercentage() 공개 메소드

Gets the total download percentage. Only avaible when the FileDownloader suports progress
public TotalPercentage ( ) : Double
리턴 Double

TotalPercentage() 공개 메소드

Gets the total download percentage. Only avaible when the FileDownloader suports progress
public TotalPercentage ( Int32 decimals ) : Double
decimals System.Int32
리턴 Double