C# Class ImageGlass.Library.Net.FileDownloader

Show file Open project: d2phap/ImageGlass

Public Methods

Method Description
DownloadFile ( string URL, string filename ) : bool

Tải 1 tập tin

DownloadFileWithProgress ( string URL, string filename ) : bool

Tải 1 tập tin (hỗ trợ thông tin dung lượng tải)

FormatFileSize ( double size, string &donVi ) : string

Định dạng đơn vị dung lượng tập tin

Private Methods

Method Description
GetFileName ( string URL ) : string

Lấy tên tập tin từ liên kết

Method Details

DownloadFile() public method

Tải 1 tập tin
public DownloadFile ( string URL, string filename ) : bool
URL string Liên kết của tập tin
filename string Nơi lưu
return bool

DownloadFileWithProgress() public method

Tải 1 tập tin (hỗ trợ thông tin dung lượng tải)
public DownloadFileWithProgress ( string URL, string filename ) : bool
URL string Liên kết của tập tin
filename string Đương dẫn lưu tập tin
return bool

FormatFileSize() public static method

Định dạng đơn vị dung lượng tập tin
public static FormatFileSize ( double size, string &donVi ) : string
size double Kích thước tập tin dạng số
donVi string Chuỗi đơn vị xuất ra
return string