ComponentRenameEventArgs Clase

Definición

Proporciona datos para el evento ComponentRename.Provides data for the ComponentRename event.

public ref class ComponentRenameEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class ComponentRenameEventArgs : EventArgs
type ComponentRenameEventArgs = class
    inherit EventArgs
Public Class ComponentRenameEventArgs
Inherits EventArgs
Herencia
ComponentRenameEventArgs
Atributos

Ejemplos

En el ejemplo siguiente se muestra ComponentRenameEventArgscómo crear un.The following example demonstrates creating a 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

Comentarios

Proporciona datos sobre un ComponentRename evento. ComponentRenameEventArgsA ComponentRenameEventArgs provides data about a ComponentRename event.

Un ComponentRenameEventArgs objeto proporciona la siguiente información:A ComponentRenameEventArgs object provides the following information:

  • Component Propiedad que hace referencia al componente cuyo nombre se va a cambiar.A Component property that references the component being renamed.

  • OldName Propiedad que indica el nombre anterior del componente.An OldName property that indicates the old name of the component.

  • NewName Propiedad que indica el nuevo nombre del componente.A NewName property that indicates the new name of the component.

Constructores

ComponentRenameEventArgs(Object, String, String)

Inicializa una nueva instancia de la clase ComponentRenameEventArgs.Initializes a new instance of the ComponentRenameEventArgs class.

Propiedades

Component

Obtiene el componente al que se va a cambiar el nombre.Gets the component that is being renamed.

NewName

Obtiene el nombre del componente después del evento de cambio de nombre.Gets the name of the component after the rename event.

OldName

Obtiene el nombre del componente antes del evento de cambio de nombre.Gets the name of the component before the rename event.

Métodos

Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Heredado de Object)
MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Heredado de Object)

Se aplica a

Consulte también: