ComponentRenameEventArgs Classe

Definizione

Fornisce dati per l'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
Ereditarietà
ComponentRenameEventArgs
Attributi

Esempi

Nell'esempio seguente viene illustrata ComponentRenameEventArgsla creazione di un oggetto.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

Commenti

Un ComponentRenameEventArgs oggetto fornisce i dati ComponentRename relativi a un evento.A ComponentRenameEventArgs provides data about a ComponentRename event.

Un ComponentRenameEventArgs oggetto fornisce le informazioni seguenti:A ComponentRenameEventArgs object provides the following information:

  • Component Proprietà che fa riferimento al componente da rinominare.A Component property that references the component being renamed.

  • OldName Proprietà che indica il nome precedente del componente.An OldName property that indicates the old name of the component.

  • NewName Proprietà che indica il nuovo nome del componente.A NewName property that indicates the new name of the component.

Costruttori

ComponentRenameEventArgs(Object, String, String)

Inizializza una nuova istanza della classe ComponentRenameEventArgs.Initializes a new instance of the ComponentRenameEventArgs class.

Proprietà

Component

Ottiene il componente che viene rinominato.Gets the component that is being renamed.

NewName

Ottiene il nome del componente dopo l'evento di ridenominazione.Gets the name of the component after the rename event.

OldName

Ottiene il nome del componente prima dell'evento di ridenominazione.Gets the name of the component before the rename event.

Metodi

Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.Determines whether the specified object is equal to the current object.

(Ereditato da Object)
GetHashCode()

Funge da funzione hash predefinita.Serves as the default hash function.

(Ereditato da Object)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.Gets the Type of the current instance.

(Ereditato da Object)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.Creates a shallow copy of the current Object.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.Returns a string that represents the current object.

(Ereditato da Object)

Si applica a

Vedi anche