ComponentEventArgs Класс
Определение
Предоставляет данные для событий ComponentAdded, ComponentAdding, ComponentRemoved и ComponentRemoving.Provides data for the ComponentAdded, ComponentAdding, ComponentRemoved, and ComponentRemoving events.
public ref class ComponentEventArgs : EventArgs
public class ComponentEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class ComponentEventArgs : EventArgs
type ComponentEventArgs = class
inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ComponentEventArgs = class
inherit EventArgs
Public Class ComponentEventArgs
Inherits EventArgs
- Наследование
- Атрибуты
Примеры
В следующем примере демонстрируется создание ComponentEventArgs .The following example demonstrates creating a ComponentEventArgs.
public:
// This example method creates a ComponentEventArgs using the specified argument.
// Typically, this type of event args is created by a design mode subsystem.
ComponentEventArgs^ CreateComponentEventArgs( IComponent^ component )
{
// The component that is related to the event: args.Component
return gcnew ComponentEventArgs( component );
}
// This example method creates a ComponentEventArgs using the specified argument.
// Typically, this type of event args is created by a design mode subsystem.
public ComponentEventArgs CreateComponentEventArgs(IComponent component)
{
ComponentEventArgs args = new ComponentEventArgs(component);
// The component that is related to the event: args.Component
return args;
}
' This example method creates a ComponentEventArgs using the specified argument.
' Typically, this type of event args is created by a design mode subsystem.
Public Function CreateComponentEventArgs(ByVal component As IComponent) As ComponentEventArgs
Dim args As New ComponentEventArgs(component)
' The component that is related to the event: args.Component
Return args
End Function
Комментарии
ComponentEventArgs — Это корневой класс аргументов события для всех событий управления компонентами.ComponentEventArgs is the root event arguments class for all component management events. Событие этого типа возникает при добавлении или удалении компонентов с помощью конструктора служб.This type of event occurs when you add or remove components using a designer.
Конструкторы
ComponentEventArgs(IComponent) |
Инициализирует новый экземпляр класса ComponentEventArgs.Initializes a new instance of the ComponentEventArgs class. |
Свойства
Component |
Возвращает компонент, связанный с событием.Gets the component associated with the event. |
Методы
Equals(Object) |
Определяет, равен ли указанный объект текущему объекту.Determines whether the specified object is equal to the current object. (Унаследовано от Object) |
GetHashCode() |
Служит хэш-функцией по умолчанию.Serves as the default hash function. (Унаследовано от Object) |
GetType() |
Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance. (Унаследовано от Object) |
MemberwiseClone() |
Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object. (Унаследовано от Object) |
ToString() |
Возвращает строку, представляющую текущий объект.Returns a string that represents the current object. (Унаследовано от Object) |