[This is preliminary documentation and is subject to change.]

Callback function, which the plugin can call to show copy progress.

Namespace: Tools.TotalCommanderT
Assembly: Tools.TotalCommander (in Tools.TotalCommander.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
protected bool ProgressProc(
	string SourceName,
	string TargetName,
	int PercentDone
)
Visual Basic
Protected Function ProgressProc ( _
	SourceName As String, _
	TargetName As String, _
	PercentDone As Integer _
) As Boolean
Visual C++
protected:
bool ProgressProc(
	String^ SourceName, 
	String^ TargetName, 
	int PercentDone
)
F#
member ProgressProc : 
        SourceName:string * 
        TargetName:string * 
        PercentDone:int -> bool 
JScript
protected function ProgressProc(
	SourceName : String, 
	TargetName : String, 
	PercentDone : int
) : boolean

Parameters

SourceName
Type: System..::..String
Name of the source file being copied. Depending on the direction of the operation (Get, Put), this may be a local file name of a name in the plugin file system.
TargetName
Type: System..::..String
Name to which the file is copied.
PercentDone
Type: System..::..Int32
Percentage of THIS file being copied. Total Commander automatically shows a second percent bar if possible when multiple files are copied.

Return Value

Total Commander returns true if the user wants to abort copying, and false if the operation can continue.

Remarks

You should call this function at least twice in the copy functions GetFile(String, String%, CopyFlags, RemoteInfo), PutFile(String, String%, CopyFlags) and RenMovFile(String, String, Boolean, Boolean, RemoteInfo), at the beginning and at the end. If you can't determine the progress, call it with 0% at the beginning and 100% at the end.

During the FindFirst(String, FindData%)/FindNext(Object, FindData%)/FindClose(Object) loop, the plugin may now call the ProgressProc(String, String, Int32) to make a progess dialog appear. This is useful for very slow connections. Don't call ProgressProc(String, String, Int32) for fast connections! The progress dialog will only be shown for normal dir changes, not for compound operations like get/put. The calls to ProgressProc(String, String, Int32) will also be ignored during the first 5 seconds, so the user isn't bothered with a progress dialog on every dir change.

Exceptions

See Also