Compartir a través de


ToolWindows.OutputWindow (Propiedad)

Obtiene el objeto OutputWindow.

Espacio de nombres:  EnvDTE80
Ensamblado:  EnvDTE80 (en EnvDTE80.dll)

Sintaxis

'Declaración
ReadOnly Property OutputWindow As OutputWindow
OutputWindow OutputWindow { get; }
property OutputWindow^ OutputWindow {
    OutputWindow^ get ();
}
abstract OutputWindow : OutputWindow with get
function get OutputWindow () : OutputWindow

Valor de propiedad

Tipo: OutputWindow
Un objeto OutputWindow.

Ejemplos

En este ejemplo se agrega una Ventana de salida denominada "My output", se activa, se le agrega texto y, a continuación, se borra. Para obtener más información sobre cómo ejecutar este ejemplo como un complemento, vea Cómo: Compilar y ejecutar los ejemplos de código del modelo de objetos de automatización.

Imports EnvDTE
Imports EnvDTE80
Public Sub OnConnection(ByVal application As Object, _
 ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, _
 ByRef custom As Array) Implements IDTExtensibility2.OnConnection
    _applicationObject = CType(application, DTE2)
    _addInInstance = CType(addInInst, AddIn)
    OutputWindowManip(_applicationObject)
End Sub
Public Sub OutputWindowManip(ByVal dte As DTE2)
    Dim myOut As OutputWindow
    myOut = _applicationObject.ToolWindows.OutputWindow
    Dim myPane As OutputWindowPane
    MsgBox("Creating an output window.")
    myPane = myOut.OutputWindowPanes.Add("My output")
    myPane.Activate()
    MsgBox("Adding some text to the output window...")
    myPane.OutputString("Adding some text to the output window.")
    MsgBox("Clear the text")
    myPane.Clear()
End Sub
using EnvDTE;
using EnvDTE80;
using System.Windows.Forms;
public void OnConnection(object application,
 ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
    _applicationObject = (DTE2)application;
    _addInInstance = (AddIn)addInInst;
    OutputWindowManip(_applicationObject);
}
public void OutputWindowManip(DTE2 dte)
{
    OutputWindow myOut;
    myOut = _applicationObject.ToolWindows.OutputWindow;
    OutputWindowPane myPane;
    MessageBox.Show("Creating an output window...");
    myPane = myOut.OutputWindowPanes.Add("My output");
    myPane.Activate();
    MessageBox.Show("Adding some text to the output window...");
    myPane.OutputString("Adding some text to the output window.");
    MessageBox.Show("Clear the text");
    myPane.Clear();
}

Seguridad de .NET Framework

Vea también

Referencia

ToolWindows Interfaz

EnvDTE80 (Espacio de nombres)