C# 클래스 BiliRanking.Core.TSDownload

파일 보기 프로젝트 열기: SkiTiSu/BiliRanking 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DownloadedBytes long
Percent float
Progressbar System.Windows.Forms.ProgressBar
Speed long
TotalBytes long

공개 메소드들

메소드 설명
GetCutFileName ( string url ) : string

根据下载地址获取文件名(截尾)

GetFileName ( string url ) : string

根据HTTP头文件并转码获取文件名

Start ( ) : void

开始下载(如文件已存在则自动加(n))

StartWithoutThread ( ) : void
Stop ( ) : void

停止下载

TSDownload ( ) : System

默认构造函数

TSDownload ( string url ) : System

构造函数,下载到同目录下,保存的文件名通过url转换

TSDownload ( string url, string filename ) : System

构造函数

removeInvChrInPath ( string origFileOrPathStr ) : string

删除路径和文件名中的非法字符 http://www.crifan.com/files/doc/docbook/crifanlib_csharp/release/webhelp/removeinvchrinpath.html

tims_Elapsed ( object sender, System e ) : void

비공개 메소드들

메소드 설명
SetPbM ( int n ) : void

修改进度条总大小

SetPbV ( int n ) : void

修改进度条已下载大小

ThreadDL ( ) : void

下载专用线程的方法

메소드 상세

GetCutFileName() 공개 정적인 메소드

根据下载地址获取文件名(截尾)
public static GetCutFileName ( string url ) : string
url string 下载地址
리턴 string

GetFileName() 공개 정적인 메소드

根据HTTP头文件并转码获取文件名
public static GetFileName ( string url ) : string
url string 下载地址
리턴 string

Start() 공개 메소드

开始下载(如文件已存在则自动加(n))
public Start ( ) : void
리턴 void

StartWithoutThread() 공개 메소드

public StartWithoutThread ( ) : void
리턴 void

Stop() 공개 메소드

停止下载
public Stop ( ) : void
리턴 void

TSDownload() 공개 메소드

默认构造函数
public TSDownload ( ) : System
리턴 System

TSDownload() 공개 메소드

构造函数,下载到同目录下,保存的文件名通过url转换
public TSDownload ( string url ) : System
url string 下载地址
리턴 System

TSDownload() 공개 메소드

构造函数
public TSDownload ( string url, string filename ) : System
url string 下载地址
filename string 保存的文件名(可包含绝对路径)
리턴 System

removeInvChrInPath() 공개 정적인 메소드

删除路径和文件名中的非法字符 http://www.crifan.com/files/doc/docbook/crifanlib_csharp/release/webhelp/removeinvchrinpath.html
public static removeInvChrInPath ( string origFileOrPathStr ) : string
origFileOrPathStr string
리턴 string

tims_Elapsed() 공개 메소드

public tims_Elapsed ( object sender, System e ) : void
sender object
e System
리턴 void

프로퍼티 상세

DownloadedBytes 공개적으로 프로퍼티

已下载大小(字节)
public long DownloadedBytes
리턴 long

Percent 공개적으로 프로퍼티

已下载百分比
public float Percent
리턴 float

Progressbar 공개적으로 프로퍼티

(可选)进度条
public ProgressBar,System.Windows.Forms Progressbar
리턴 System.Windows.Forms.ProgressBar

Speed 공개적으로 프로퍼티

public long Speed
리턴 long

TotalBytes 공개적으로 프로퍼티

总大小(字节)
public long TotalBytes
리턴 long