ProgressChangedEventArgs 类

定义

ProgressChanged 事件提供数据。Provides data for the ProgressChanged event.

public ref class ProgressChangedEventArgs : EventArgs
public class ProgressChangedEventArgs : EventArgs
type ProgressChangedEventArgs = class
    inherit EventArgs
Public Class ProgressChangedEventArgs
Inherits EventArgs
继承
ProgressChangedEventArgs
派生

示例

下面的代码示例演示如何使用 ProgressChangedEventArgs 类。The following code example shows how to use the ProgressChangedEventArgs class. 此示例是BackgroundWorker类的一个更大示例的一部分。This example is part of a larger example for the BackgroundWorker class.

// This event handler updates the progress bar.
void backgroundWorker1_ProgressChanged( Object^ /*sender*/, ProgressChangedEventArgs^ e )
{
   this->progressBar1->Value = e->ProgressPercentage;
}
// This event handler updates the progress bar.
private void backgroundWorker1_ProgressChanged(object sender,
    ProgressChangedEventArgs e)
{
    this.progressBar1.Value = e.ProgressPercentage;
}
' This event handler updates the progress bar.
Private Sub backgroundWorker1_ProgressChanged( _
ByVal sender As Object, ByVal e As ProgressChangedEventArgs) _
Handles backgroundWorker1.ProgressChanged

    Me.progressBar1.Value = e.ProgressPercentage

End Sub

构造函数

ProgressChangedEventArgs(Int32, Object)

初始化 ProgressChangedEventArgs 类的新实例。Initializes a new instance of the ProgressChangedEventArgs class.

属性

ProgressPercentage

获取异步任务的进度百分比。Gets the asynchronous task progress percentage.

UserState

获取唯一的用户状态。Gets a unique user state.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅