DownloadProgressChangedEventArgsとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DownloadProgressChangedEventArgsの意味・解説 

DownloadProgressChangedEventArgs クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

DownloadProgressChanged イベントデータ提供します

名前空間: System.Deployment.Application
アセンブリ: System.Deployment (system.deployment.dll 内)
構文構文

Public Class DownloadProgressChangedEventArgs
    Inherits ProgressChangedEventArgs
Dim instance As DownloadProgressChangedEventArgs
public class DownloadProgressChangedEventArgs
 : ProgressChangedEventArgs
public ref class DownloadProgressChangedEventArgs
 : public ProgressChangedEventArgs
public class DownloadProgressChangedEventArgs
 extends ProgressChangedEventArgs
public class DownloadProgressChangedEventArgs
 extends ProgressChangedEventArgs
継承階層継承階層
System.Object
   System.EventArgs
     System.ComponentModel.ProgressChangedEventArgs
      System.Deployment.Application.DownloadProgressChangedEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DownloadProgressChangedEventArgs メンバ
System.Deployment.Application 名前空間

DownloadProgressChangedEventArgs クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

WebClient の DownloadProgressChanged イベントデータ提供します

名前空間: System.Net
アセンブリ: System (system.dll 内)
構文構文

Public Class DownloadProgressChangedEventArgs
    Inherits ProgressChangedEventArgs
Dim instance As DownloadProgressChangedEventArgs
public class DownloadProgressChangedEventArgs
 : ProgressChangedEventArgs
public ref class DownloadProgressChangedEventArgs
 : public ProgressChangedEventArgs
public class DownloadProgressChangedEventArgs
 extends ProgressChangedEventArgs
public class DownloadProgressChangedEventArgs
 extends ProgressChangedEventArgs
解説解説

このクラスインスタンスは DownloadProgressChangedEventHandler に渡されます。

使用例使用例

DownloadProgressChanged イベントイベント ハンドラ設定するコード例次に示します

'  Sample call : DownLoadFileInBackground2 ("http:' www.contoso.com/logs/January.txt")
Public Shared Sub DownLoadFileInBackground2(ByVal
 address As String)

    Dim client As WebClient = New
 WebClient()

    '  Specify that the DownloadFileCallback method gets called
    '  when the download completes.
    AddHandler client.DownloadFileCompleted, AddressOf
 DownloadFileCallback2
    '  Specify a progress notification handler.
    AddHandler client.DownloadProgressChanged, AddressOf
 DownloadProgressCallback
                Dim uri as Uri = New
 Uri(address)
    client.DownloadFileAsync(uri, "serverdata.txt")
End Sub

// Sample call : DownLoadFileInBackground2 ("http://www.contoso.com/logs/January.txt");
public static void DownLoadFileInBackground2
 (string address)
{
    WebClient client = new WebClient ();
    Uri uri = new Uri(address);

    // Specify that the DownloadFileCallback method gets called
    // when the download completes.
    client.DownloadFileCompleted += new AsyncCompletedEventHandler
 (DownloadFileCallback2);
    // Specify a progress notification handler.
    client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressCallback);
    client.DownloadFileAsync (uri, "serverdata.txt");
}

このイベントハンドラ実装するコード例次に示します

Shared Sub UploadProgressCallback(ByVal
 sender As Object, ByVal
 e As UploadProgressChangedEventArgs)

    '  Displays the operation identifier, and the transfer progress.
    Console.WriteLine("{0}    uploaded {1} of {2} bytes. {3} %
 complete...", _
     CStr(e.UserState), e.BytesSent, e.TotalBytesToSend, e.ProgressPercentage)
End Sub
Shared Sub DownloadProgressCallback(ByVal
 sender As Object, ByVal
 e As DownloadProgressChangedEventArgs)

    '  Displays the operation identifier, and the transfer progress.
    Console.WriteLine("0}    downloaded 1} of 2} bytes. 3} % complete...",
 _
     CStr(e.UserState), e.BytesReceived, e.TotalBytesToReceive, e.ProgressPercentage)
End Sub
static void UploadProgressCallback(object sender,
 UploadProgressChangedEventArgs e)
{
    // Displays the operation identifier, and the transfer progress.
    Console.WriteLine("{0}    uploaded {1} of {2} bytes. {3} % complete...",
 
        (string)e.UserState, 
        e.BytesSent, 
        e.TotalBytesToSend,
        e.ProgressPercentage);
}
static void DownloadProgressCallback(object
 sender, DownloadProgressChangedEventArgs e)
{
    // Displays the operation identifier, and the transfer progress.
    Console.WriteLine("{0}    downloaded {1} of {2} bytes. {3} % complete...",
 
        (string)e.UserState, 
        e.BytesReceived, 
        e.TotalBytesToReceive,
        e.ProgressPercentage);
}
継承階層継承階層
System.Object
   System.EventArgs
     System.ComponentModel.ProgressChangedEventArgs
      System.Net.DownloadProgressChangedEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DownloadProgressChangedEventArgs メンバ
System.Net 名前空間

DownloadProgressChangedEventArgs プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ BytesDownloaded ローカル コンピュータダウンロードされるバイト数を取得します
パブリック プロパティ ProgressPercentage  非同期タスク進行状況割合取得します。 ( ProgressChangedEventArgs から継承されます。)
パブリック プロパティ State ダウンロード進行状況取得します
パブリック プロパティ TotalBytesToDownload ダウンロード操作の総バイト数を取得します
パブリック プロパティ UserState  一意ユーザー状態を取得します。 ( ProgressChangedEventArgs から継承されます。)
参照参照

関連項目

DownloadProgressChangedEventArgs クラス
System.Deployment.Application 名前空間

DownloadProgressChangedEventArgs プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ BytesReceived 受信したバイト数を取得します
パブリック プロパティ ProgressPercentage  非同期タスク進行状況割合取得します。 ( ProgressChangedEventArgs から継承されます。)
パブリック プロパティ TotalBytesToReceive WebClient のデータダウンロード操作の総バイト数を取得します
パブリック プロパティ UserState  一意ユーザー状態を取得します。 ( ProgressChangedEventArgs から継承されます。)
参照参照

関連項目

DownloadProgressChangedEventArgs クラス
System.Net 名前空間

DownloadProgressChangedEventArgs メソッド


DownloadProgressChangedEventArgs メソッド


DownloadProgressChangedEventArgs メンバ

DownloadProgressChanged イベントデータ提供します

DownloadProgressChangedEventArgs データ型公開されるメンバを以下の表に示します


パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ BytesDownloaded ローカル コンピュータダウンロードされるバイト数を取得します
パブリック プロパティ ProgressPercentage  非同期タスク進行状況割合取得します。(ProgressChangedEventArgs から継承されます。)
パブリック プロパティ State ダウンロード進行状況取得します
パブリック プロパティ TotalBytesToDownload ダウンロード操作の総バイト数を取得します
パブリック プロパティ UserState  一意ユーザー状態を取得します。(ProgressChangedEventArgs から継承されます。)
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

DownloadProgressChangedEventArgs クラス
System.Deployment.Application 名前空間

DownloadProgressChangedEventArgs メンバ

WebClient の DownloadProgressChanged イベントデータ提供します

DownloadProgressChangedEventArgs データ型公開されるメンバを以下の表に示します


パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ BytesReceived 受信したバイト数を取得します
パブリック プロパティ ProgressPercentage  非同期タスク進行状況割合取得します。(ProgressChangedEventArgs から継承されます。)
パブリック プロパティ TotalBytesToReceive WebClientデータダウンロード操作の総バイト数を取得します
パブリック プロパティ UserState  一意ユーザー状態を取得します。(ProgressChangedEventArgs から継承されます。)
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

DownloadProgressChangedEventArgs クラス
System.Net 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DownloadProgressChangedEventArgs」の関連用語

DownloadProgressChangedEventArgsのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DownloadProgressChangedEventArgsのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS