procedure TfrmMain.AddTask(const strFile, strURL: string);
var
lviTmp : TListItem;
recEvent: TCallBackMethod;
begin
if not assigned(FTaskThread) then
begin
recEvent.FOnStart := OnStart;
recEvent.FOnError := OnError;
recEvent.FOnStepIt:= OnStepIt;
recEvent.FOnFinish:= OnFinish;
FTaskThread:= TTaskThread.Create(recEvent, FMaxTask, FThreads);
end;
LockTask;
try
lviTmp:= lvDownLoad.Items.Add;
lviTmp.ImageIndex:= 0;
lviTmp.SubItems.Add(strFile);
lviTmp.SubItems.Add('0.0%');
lviTmp.SubItems.Add('1');
lviTmp.SubItems.Add('0 k/s');
lviTmp.SubItems.Add('00:00:00.000');
lviTmp.Data:= Pointer(GetTickCount);
if Trim(FSavePath) = '' then
begin
FTaskThread.AddTask(Integer(lviTmp.Data),
ExtractFilePath(ParamStr(0)) + 'Music\' + strFile,
strURL);
AddTaskInfo(Integer(lviTmp.Data), strURL,
ExtractFilePath(ParamStr(0)) + 'Music\' + strFile,
lvMusicLst.Selected.SubItems.Strings[1],
lvMusicLst.Selected.SubItems.Strings[2]);
end
else begin
FTaskThread.AddTask(Integer(lviTmp.Data), FSavePath + '\' + strFile, strURL);
AddTaskInfo(Integer(lviTmp.Data), strURL, FSavePath + '\' + strFile,
lvMusicLst.Selected.SubItems.Strings[1],
lvMusicLst.Selected.SubItems.Strings[2]);
end;
finally
UnLockTask;
end;
end;
没有合适的资源?快使用搜索试试~ 我知道了~
http_download.rar_http_Download_完成端口
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共8个文件
pas:7个
txt:1个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 109 浏览量
2022-09-20
16:24:44
上传
评论
收藏 16KB RAR 举报
温馨提示
封装完成端口的类,及测试例子 封装完成端口的类,及测试例子
资源推荐
资源详情
资源评论
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083646.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/TXT.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 8 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/823be93c18be4b9fa55c75bb75c369e0_weixin_42659791.jpg!1)
Kinonoyomeo
- 粉丝: 77
- 资源: 1万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)