Interfaccia Events
Consente l'accesso a tutti gli eventi nel modello estensibilità.Gli eventi possono essere esposti da oggetti specifici all'interno del modello estensibilità.
Spazio dei nomi: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Sintassi
'Dichiarazione
<GuidAttribute("134170F8-93B1-42DD-9F89-A2AC7010BA07")> _
Public Interface Events
[GuidAttribute("134170F8-93B1-42DD-9F89-A2AC7010BA07")]
public interface Events
[GuidAttribute(L"134170F8-93B1-42DD-9F89-A2AC7010BA07")]
public interface class Events
[<GuidAttribute("134170F8-93B1-42DD-9F89-A2AC7010BA07")>]
type Events = interface end
public interface Events
Il tipo Events espone i seguenti membri.
Proprietà
Nome | Descrizione | |
---|---|---|
BuildEvents | ottiene BuildEvents oggetto, che fornisce eventi per la compilazione della soluzione. | |
CommandBarEvents | Ottiene un oggetto che fornisce eventi generati quando fornito CommandBarControl l'oggetto è selezionato. | |
CommandEvents | ottiene CommandEvents per il comando specificato. | |
DebuggerEvents | Ottiene l'oggetto che fornisce eventi dal debugger. | |
DocumentEvents | ottiene DocumentEvents che fornisce eventi per il documento. | |
DTEEvents | ottiene DTEEvents che fornisce eventi per l'ambiente di sviluppo. | |
FindEvents | ottiene FindEvents per Find operazione. | |
MiscFilesEvents | ottiene ProjectItemsEvents per la soluzione. | |
OutputWindowEvents | ottiene OutputWindowEvents per gli eventi della finestra. | |
SelectionEvents | ottiene SelectionEvents per la selezione. | |
SolutionEvents | ottiene SolutionEvents oggetto per la soluzione. | |
SolutionItemsEvents | ottiene ProjectItemsEvents oggetto per la soluzione. | |
TaskListEvents | ottiene TaskListEvents per l'ambiente di sviluppo. | |
TextEditorEvents | ottiene TextEditorEvents oggetto per l'ide. | |
WindowEvents | ottiene WindowEvents oggetto che fornisce eventi per le finestre dell'ambiente di sviluppo. |
In alto
Metodi
Nome | Descrizione | |
---|---|---|
GetObject | Ottiene un'interfaccia o dell'oggetto che è associato tardivamente a DTE l'oggetto e possono accedere per nome in fase di esecuzione. |
In alto
Note
il modello di automazione contiene una radice Events oggetto dai client di automazione scritti in qualsiasi linguaggio possibile fare riferimento agli eventi di automazione, ad esempio SolutionEvents.
I vari strumenti dell'IDE, i tipi di progetto, editor, e così via possono aggiungere eventi aggiuntivi a Events oggetto che è specifico di essi.Ad esempio, Visual C++ aggiunge VCProjectItemsEvents proprietà.
Esempi
Public Module Module1
Dim WithEvents bldevents As BuildEvents
Dim applicationObject As EnvDTE.DTE
Sub EventsExample()
Dim addInInstance As EnvDTE.AddIn
applicationObject = CType(Application, EnvDTE.DTE)
bldevents = CType(applicationObject.Events.BuildEvents, EnvDTE.BuildEvents)
End Sub
Private Sub bldevents_OnBuildDone(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles bldevents.OnBuildDone
MsgBox("Build complete")
End Sub
End Module