共用方式為


FileSyncProvider.CopyingFile 事件

定期發生來顯示複製檔案時的進度。

命名空間: Microsoft.Synchronization.Files
組件: Microsoft.Synchronization.Files (在 microsoft.synchronization.files.dll)

語法

'宣告
Public Event CopyingFile As EventHandler(Of CopyingFileEventArgs)
'用途
Dim instance As FileSyncProvider
Dim handler As EventHandler(Of CopyingFileEventArgs)

AddHandler instance.CopyingFile, handler
public event EventHandler<CopyingFileEventArgs> CopyingFile
public:
event EventHandler<CopyingFileEventArgs^>^ CopyingFile {
    void add (EventHandler<CopyingFileEventArgs^>^ value);
    void remove (EventHandler<CopyingFileEventArgs^>^ value);
}
/** @event */
public void add_CopyingFile (EventHandler<CopyingFileEventArgs> value)

/** @event */
public void remove_CopyingFile (EventHandler<CopyingFileEventArgs> value)
JScript supports the use of events, but not the declaration of new ones.

備註

每一個寫入檔案中的 512-KB 區塊都會引發這個事件一次。

如果檔案小於 512 KB,就不會引發這個事件。

不引發這個事件,表示檔案複製作業完成。而在複製檔案之後,將會引發 AppliedChange 事件。

CopyingFileEventArgs 類別會提供檔案的路徑以及已複製之檔案的百分比。

請參閱

參考

FileSyncProvider 類別
FileSyncProvider 成員
Microsoft.Synchronization.Files 命名空間