/// <summary> /// Handles TransferProgressChanged events from a BackgroundTransferRequest. /// </summary> private void HandleTransferProgressChanged(object sender, BackgroundTransferEventArgs e) { BackgroundTransferRequest request = e.Request; long totalBytesToReceive = request.TotalBytesToReceive; long bytesReceived = request.BytesReceived; var args = new LiveOperationProgress(bytesReceived, totalBytesToReceive); this.OnProgressChanged(args); }
/// <summary> /// Handles TransferProgressChanged events from a BackgroundTransferRequest. /// </summary> private void HandleTransferProgressChanged(object sender, BackgroundTransferEventArgs e) { BackgroundTransferRequest request = e.Request; long totalBytesToSend = request.TotalBytesToSend; long bytesSent = request.BytesSent; var result = new LiveOperationProgress(bytesSent, totalBytesToSend); this.OnProgressChanged(result); }
public static void ReportProgress(object handler, LiveOperationProgress progress) { var progressHandler = handler as IProgress <LiveOperationProgress>; if (progressHandler != null) { progressHandler.Report(progress); } }
private void TransferProgressChanged(LiveOperationProgress progress) { if (!IsTransfering) { IsTransfering = true; Status = Resources.AppResources.Text_Blurb_BackgroundTransferTransfering; } BytesSent = progress.BytesTransferred; TotalBytesToSend = progress.TotalBytes; Progress = progress.ProgressPercentage; if (progress.ProgressPercentage == 100d) { Status = Resources.AppResources.Text_Blurb_BackgroundTransferComplete; } }
private void OnProgressChanged(LiveOperationProgress e) { this.progress.Report(e); }
private void OnSkyDriveUploadProgress(LiveOperationProgress progress) { PercentCompleted = progress.ProgressPercentage; }