markus / MarkusAutoUpdate / src / NetSparkle / Events / ItemDownloadProgressEventArgs.cs @ d8f5045e
이력 | 보기 | 이력해설 | 다운로드 (2.3 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.ComponentModel; |
4 |
using System.Text; |
5 |
|
6 |
namespace NetSparkleUpdater.Events |
7 |
{ |
8 |
/// <summary> |
9 |
/// Provides data for a progress event for downloading an AppCastItem from a |
10 |
/// web server. |
11 |
/// </summary> |
12 |
public class ItemDownloadProgressEventArgs : ProgressChangedEventArgs |
13 |
{ |
14 |
/// <summary> |
15 |
/// Create an <see cref="ItemDownloadProgressEventArgs"/> object based on |
16 |
/// the total percentage (0-100, inclusive) and the custom user state. |
17 |
/// </summary> |
18 |
/// <param name="progressPercentage">the total download progress as an int (between 0-100)</param> |
19 |
/// <param name="userState">the custom user state sent along with the download progress</param> |
20 |
public ItemDownloadProgressEventArgs(int progressPercentage, object userState) : base(progressPercentage, userState) |
21 |
{ |
22 |
BytesReceived = 0; |
23 |
TotalBytesToReceive = 0; |
24 |
} |
25 |
|
26 |
/// <summary> |
27 |
/// Create an <see cref="ItemDownloadProgressEventArgs"/> object based on |
28 |
/// the total percentage (0-100, inclusive), the custom user state, the |
29 |
/// number of bytes received, and the number of total bytes that need to |
30 |
/// be downloaded. |
31 |
/// </summary> |
32 |
/// <param name="progressPercentage">the total download progress as an int (between 0-100)</param> |
33 |
/// <param name="userState">the custom user state sent along with the download progress</param> |
34 |
/// <param name="bytesReceived">the number of bytes received by the downloader</param> |
35 |
/// <param name="totalBytesToReceive">the total number of bytes that need to be downloadeds</param> |
36 |
public ItemDownloadProgressEventArgs(int progressPercentage, object userState, long bytesReceived, long totalBytesToReceive) : base(progressPercentage, userState) |
37 |
{ |
38 |
BytesReceived = bytesReceived; |
39 |
TotalBytesToReceive = totalBytesToReceive; |
40 |
} |
41 |
|
42 |
/// <summary> |
43 |
/// The number of bytes received by the downloader |
44 |
/// </summary> |
45 |
public long BytesReceived { get; private set; } |
46 |
|
47 |
/// <summary> |
48 |
/// The total number of bytes that need to be downloaded |
49 |
/// </summary> |
50 |
public long TotalBytesToReceive { get; private set; } |
51 |
} |
52 |
} |