ComponentRenameEventArgs 类

定义

ComponentRename 事件提供数据。

public ref class ComponentRenameEventArgs : EventArgs
public class ComponentRenameEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class ComponentRenameEventArgs : EventArgs
type ComponentRenameEventArgs = class
    inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ComponentRenameEventArgs = class
    inherit EventArgs
Public Class ComponentRenameEventArgs
Inherits EventArgs
继承
ComponentRenameEventArgs
属性

示例

以下示例演示如何创建 ComponentRenameEventArgs

public:
   // This example method creates a ComponentRenameEventArgs using the specified arguments.
   // Typically, this type of event args is created by a design mode subsystem.
   ComponentRenameEventArgs^ CreateComponentRenameEventArgs( Object^ component, String^ oldName, String^ newName )
   {
      // The component that was renamed:          args.Component
      // The previous name of the component:      args.OldName
      // The new name of the component:           args.NewName
      return gcnew ComponentRenameEventArgs( component, oldName, newName );
   }
// This example method creates a ComponentRenameEventArgs using the specified arguments.
// Typically, this type of event args is created by a design mode subsystem.  
public ComponentRenameEventArgs CreateComponentRenameEventArgs(object component, string oldName, string newName)
{
    ComponentRenameEventArgs args = new ComponentRenameEventArgs(component, oldName, newName);

    // The component that was renamed:          args.Component
    // The previous name of the component:      args.OldName
    // The new name of the component:           args.NewName            

    return args;
}
' This example method creates a ComponentRenameEventArgs using the specified arguments.
' Typically, this type of event args is created by a design mode subsystem.  
Public Function CreateComponentRenameEventArgs(ByVal component As Object, ByVal oldName As String, ByVal newName As String) As ComponentRenameEventArgs
    Dim args As New ComponentRenameEventArgs(component, oldName, newName)

    ' The component that was renamed:          args.Component
    ' The previous name of the component:      args.OldName
    ' The new name of the component:           args.NewName            

    Return args
End Function

注解

提供有关 ComponentRenameEventArgs 事件 ComponentRename 的数据。

对象 ComponentRenameEventArgs 提供以下信息:

  • 一个 Component 属性,该属性引用正在重命名的组件。

  • 指示 OldName 组件的旧名称的属性。

  • 指示 NewName 组件的新名称的属性。

构造函数

ComponentRenameEventArgs(Object, String, String)

初始化 ComponentRenameEventArgs 类的新实例。

属性

Component

获取所命名的组件。

NewName

获取组件在重命名事件发生后的名称。

OldName

获取组件在重命名事件发生前的名称。

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅