chenshilong 6 years ago
parent
commit
81a83dc5a0
2 changed files with 5 additions and 1 deletions
  1. 1 0
      Forms/UpFileFrame.dfm
  2. 4 1
      Forms/UpFileManageFrame.pas

+ 1 - 0
Forms/UpFileFrame.dfm

@@ -63,6 +63,7 @@ object UpFileView: TUpFileView
       Width = 28
       Height = 30
       Hint = #22312#32447#39044#35272
+      Visible = False
       Layout = pbsImageLeft
       Spacing = 4
       ImageNormal.Data = {

+ 4 - 1
Forms/UpFileManageFrame.pas

@@ -354,7 +354,7 @@ end;
 
 procedure TUpFileManageView.btnDownClick(Sender: TObject);
 var svDlg: TSaveDialog;
-  sFile: string;
+  sFile, sName, sPath: string;
 begin
   if not Assigned(Selected) then Exit;
 
@@ -377,6 +377,9 @@ begin
       if PHPWeb.DownFile(Selected.Data.DownURL, sFile) then
       begin
         Selected.Data.Status := ufsNormal;
+        sName := ExtractFileName(sFile);
+        sPath := ExtractFilePath(sFile);
+        ShellExecute(Handle, 'open', pchar(sName), nil, pchar(sPath), SW_SHOWNORMAL);
       end
       else
       begin