⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 webcopy.hpp

📁 TMS component pack v4.2 for delphi
💻 HPP
📖 第 1 页 / 共 2 页
字号:
	AnsiString __fastcall MakeProxyUrl(AnsiString url);
	AnsiString __fastcall ExtractServer(AnsiString url);
	AnsiString __fastcall RemoveServer(AnsiString url);
	void __fastcall CreateForm(void);
	void __fastcall DestroyForm(void);
	void __fastcall ThreadDone(System::TObject* Sender);
	int __fastcall NumInetItems(void);
	AnsiString __fastcall GetVersion();
	void __fastcall SetVersion(const AnsiString Value);
	int __fastcall GetVersionNr(void);
	
protected:
	void __fastcall CancelClick(System::TObject* Sender);
	void __fastcall OpenFile(System::TObject* Sender);
	void __fastcall OpenFolder(System::TObject* Sender);
	
public:
	void __fastcall Execute(void);
	void __fastcall ThreadExecute(void);
	void __fastcall ThreadExecAndWait(void);
	void __fastcall DoCopy(void);
	void __fastcall CancelCopy(void);
	__fastcall virtual TWebCopy(Classes::TComponent* AOwner);
	__fastcall virtual ~TWebCopy(void);
	__property Forms::TForm* ProgressForm = {read=FForm};
	__property Comctrls::TProgressBar* ProgressBar = {read=FProgress};
	__property Stdctrls::TLabel* ProgressFileLabel = {read=FFileLbl};
	__property Stdctrls::TLabel* ProgressSizeLabel = {read=FSizeLbl};
	__property Stdctrls::TLabel* ProgressRateLabel = {read=FRateLbl};
	__property bool FormClosed = {read=FFormClosed, write=FFormClosed, nodefault};
	
__published:
	__property bool AlwaysOnTop = {read=FAlwaysOnTop, write=FAlwaysOnTop, default=0};
	__property AnsiString DlgCancel = {read=FDlgCancel, write=FDlgCancel};
	__property AnsiString DlgCaption = {read=FDlgCaption, write=FDlgCaption};
	__property AnsiString DlgCompleted = {read=FDlgCompleted, write=FDlgCompleted};
	__property AnsiString DlgClose = {read=FDlgClose, write=FDlgClose};
	__property AnsiString DlgFileLabel = {read=FFileLabel, write=FFileLabel};
	__property AnsiString DlgFileOfLabel = {read=FFileOfLabel, write=FFileOfLabel};
	__property AnsiString DlgFromServerLabel = {read=FFromServerLabel, write=FFromServerLabel};
	__property AnsiString DlgToServerLabel = {read=FToServerLabel, write=FToServerLabel};
	__property AnsiString DlgProgressLabel = {read=FProgressLabel, write=FProgressLabel};
	__property AnsiString DlgRateLabel = {read=FRateLabel, write=FRateLabel};
	__property AnsiString DlgTimeLabel = {read=FTimeLabel, write=FTimeLabel};
	__property AnsiString DlgCopying = {read=FDlgCopying, write=FDlgCopying};
	__property AnsiString DlgDwnload = {read=FDlgDwnload, write=FDlgDwnload};
	__property AnsiString DlgUpload = {read=FDlgUpload, write=FDlgUpload};
	__property AnsiString DlgOpenFile = {read=FDlgOpenFile, write=FDlgOpenFile};
	__property AnsiString DlgOpenFolder = {read=FDlgOpenFolder, write=FDlgOpenFolder};
	__property bool FTPPassive = {read=FFTPPassive, write=FFTPPassive, nodefault};
	__property bool HTTPKeepAliveAuthentication = {read=FKeepAlive, write=FKeepAlive, default=0};
	__property TWebCopyItems* Items = {read=FItems, write=FItems};
	__property AnsiString Proxy = {read=FProxy, write=FProxy};
	__property AnsiString ProxyUserID = {read=FProxyUserID, write=FProxyUserID};
	__property AnsiString ProxyPassword = {read=FProxyPassword, write=FProxyPassword};
	__property bool ShowDialog = {read=FShowDialog, write=FShowDialog, default=1};
	__property bool ShowOpenFile = {read=FShowOpenFile, write=FShowOpenFile, default=0};
	__property bool ShowOpenFolder = {read=FShowOpenFolder, write=FShowOpenFolder, default=0};
	__property bool ShowCompletion = {read=FShowCompletion, write=FShowCompletion, default=0};
	__property bool ShowFileName = {read=FShowFileName, write=FShowFileName, default=1};
	__property bool ShowServer = {read=FShowServer, write=FShowServer, default=1};
	__property bool ShowTime = {read=FShowTime, write=FShowTime, default=0};
	__property TWebCopyConnectError OnConnectError = {read=FOnConnectError, write=FOnConnectError};
	__property TWebCopyCancel OnCopyCancel = {read=FOnCopyCancel, write=FOnCopyCancel};
	__property TWebCopyThreadDone OnCopyDone = {read=FOnCopyDone, write=FOnCopyDone};
	__property TWebCopyOverwrite OnCopyOverWrite = {read=FOnCopyOverwrite, write=FOnCopyOverwrite};
	__property TWebCopyProgress OnCopyProgress = {read=FOnCopyProgress, write=FOnCopyProgress};
	__property TWebCopyError OnError = {read=FOnError, write=FOnError};
	__property TWebCopyErrorInfo OnErrorInfo = {read=FOnErrorInfo, write=FOnErrorInfo};
	__property TWebCopyFileDone OnFileDone = {read=FOnFileDone, write=FOnFileDone};
	__property TWebCopyFileStart OnFileStart = {read=FOnFileStart, write=FOnFileStart};
	__property TWebCopyFileDateCheck OnFileDateCheck = {read=FOnFileDateCheck, write=FOnFileDateCheck};
	__property TWebCopyURLNotFound OnURLNotFound = {read=FOnURLNotFound, write=FOnURLNotFound};
	__property TWebCopyNoNewFile OnNoNewFileFound = {read=FOnNoNewFile, write=FOnNoNewFile};
	__property AnsiString Version = {read=GetVersion, write=SetVersion};
};


class PASCALIMPLEMENTATION TWCopyThread : public Classes::TThread 
{
	typedef Classes::TThread inherited;
	
private:
	TWebCopy* webcopy;
	
protected:
	virtual void __fastcall Execute(void);
	
public:
	__fastcall TWCopyThread(TWebCopy* AWebCopy);
public:
	#pragma option push -w-inl
	/* TThread.Destroy */ inline __fastcall virtual ~TWCopyThread(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TWebCopyProtocol { wpHttp, wpFtp, wpFile, wpFtpUpload, wpHttpUpload, wpMultiFtp, wpMultiFtpUpload };
#pragma option pop

class PASCALIMPLEMENTATION TWebCopyItem : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	AnsiString FURL;
	AnsiString FTargetDir;
	AnsiString FTargetFilename;
	TWebCopyProtocol FProtocol;
	TWebCopyHTTPCommand FHTTPCommand;
	AnsiString FFTPHost;
	AnsiString FFTPUserID;
	AnsiString FFTPPassword;
	int FFTPPort;
	bool FActive;
	bool FSuccess;
	bool FCopyNewerOnly;
	System::TDateTime FFileDate;
	bool FNoNewVersion;
	System::TDateTime FNewFileDate;
	TWebCopyAuthentication FAuthenticate;
	AnsiString FHTTPUserID;
	AnsiString FHTTPPassword;
	
public:
	__fastcall virtual TWebCopyItem(Classes::TCollection* Collection);
	__property bool Success = {read=FSuccess, nodefault};
	__property bool NoNewVersion = {read=FNoNewVersion, nodefault};
	__property System::TDateTime NewFileDate = {read=FNewFileDate, write=FNewFileDate};
	
__published:
	__property bool Active = {read=FActive, write=FActive, default=1};
	__property TWebCopyAuthentication Authenticate = {read=FAuthenticate, write=FAuthenticate, default=0};
	__property bool CopyNewerOnly = {read=FCopyNewerOnly, write=FCopyNewerOnly, default=0};
	__property System::TDateTime FileDate = {read=FFileDate, write=FFileDate};
	__property AnsiString FTPHost = {read=FFTPHost, write=FFTPHost};
	__property AnsiString FTPUserID = {read=FFTPUserID, write=FFTPUserID};
	__property AnsiString FTPPassword = {read=FFTPPassword, write=FFTPPassword};
	__property int FTPPort = {read=FFTPPort, write=FFTPPort, nodefault};
	__property TWebCopyHTTPCommand HTTPCommand = {read=FHTTPCommand, write=FHTTPCommand, nodefault};
	__property TWebCopyProtocol Protocol = {read=FProtocol, write=FProtocol, nodefault};
	__property AnsiString TargetDir = {read=FTargetDir, write=FTargetDir};
	__property AnsiString TargetFilename = {read=FTargetFilename, write=FTargetFilename};
	__property AnsiString URL = {read=FURL, write=FURL};
	__property AnsiString HTTPUserID = {read=FHTTPUserID, write=FHTTPUserID};
	__property AnsiString HTTPPassword = {read=FHTTPPassword, write=FHTTPPassword};
public:
	#pragma option push -w-inl
	/* TCollectionItem.Destroy */ inline __fastcall virtual ~TWebCopyItem(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint errFilesIdentical = 0x0;
static const Shortint errCannotOpenSourceFile = 0x1;
static const Shortint errSourceFileZeroLength = 0x2;
static const Shortint errCannotCreateTargetFile = 0x3;
static const Shortint errCopyReadFailure = 0x4;
static const Shortint errCopyWriteFailure = 0x5;
static const Shortint errCannotConnect = 0x6;
static const Shortint MAJ_VER = 0x1;
static const Shortint MIN_VER = 0x6;
static const Shortint REL_VER = 0x0;
static const Shortint BLD_VER = 0x1;

}	/* namespace Webcopy */
using namespace Webcopy;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Webcopy

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -