Condividi tramite


Metodo OutputWindowPane.OutputTaskItemString

Visualizzare una stringa in output la finestra e un elemento corrispondente a Elenco attività.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

'Dichiarazione
Sub OutputTaskItemString ( _
    Text As String, _
    Priority As vsTaskPriority, _
    SubCategory As String, _
    Icon As vsTaskIcon, _
    FileName As String, _
    Line As Integer, _
    Description As String, _
    Force As Boolean _
)
void OutputTaskItemString(
    string Text,
    vsTaskPriority Priority,
    string SubCategory,
    vsTaskIcon Icon,
    string FileName,
    int Line,
    string Description,
    bool Force
)
void OutputTaskItemString(
    [InAttribute] String^ Text, 
    [InAttribute] vsTaskPriority Priority, 
    [InAttribute] String^ SubCategory, 
    [InAttribute] vsTaskIcon Icon, 
    [InAttribute] String^ FileName, 
    [InAttribute] int Line, 
    [InAttribute] String^ Description, 
    [InAttribute] bool Force
)
abstract OutputTaskItemString : 
        Text:string * 
        Priority:vsTaskPriority * 
        SubCategory:string * 
        Icon:vsTaskIcon * 
        FileName:string * 
        Line:int * 
        Description:string * 
        Force:bool -> unit 
function OutputTaskItemString(
    Text : String, 
    Priority : vsTaskPriority, 
    SubCategory : String, 
    Icon : vsTaskIcon, 
    FileName : String, 
    Line : int, 
    Description : String, 
    Force : boolean
)

Parametri

  • Text
    Tipo: System.String
    obbligatorio.Il testo da aggiungere a output finestra.
  • SubCategory
    Tipo: System.String
    obbligatorio.la sottocategoria da utilizzare per il nuovo elemento attività.
  • Icon
    Tipo: EnvDTE.vsTaskIcon
    obbligatorio.In vsTaskIcon costante che rappresenta l'icona da utilizzare per il nuovo elemento attività.
  • FileName
    Tipo: System.String
    obbligatorio.Il nome file da associare al nuovo elemento attività.può essere una stringa vuota.
  • Line
    Tipo: System.Int32
    obbligatorio.La riga di codice a cui il nuovo elemento attività riferimento.
  • Description
    Tipo: System.String
    obbligatorio.La descrizione del nuovo elemento attività.
  • Force
    Tipo: System.Boolean
    facoltativo.indica se output la finestra verrà immediatamente aggiornamento Elenco attività.il valore predefinito è True.Se si aggiungono diversi elementi, impostare la forza a Falsee forza quindi impostata su True nell'ultimo elemento.

Note

Per numeri di riga vengano visualizzate in Elenco attività, è necessario specificare il percorso completo in FileName parametro.Ad esempio, c:\workfile.txt). Il file deve essere presente in quella posizione.La ragione è che output i controlli della finestra per accertarsi che il file specificato esiste prima della visualizzazione dei numeri di riga.

Esempi

Sub OutputTaskItemStringExample()
   ' Create a tool window handle for the Output window.
   Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
   ' Create handles to the Output window and its panes.
   Dim OW As OutputWindow = win.Object
   Dim OWp As OutputWindowPane

   ' Add a new pane to the Output window.
   OWp = OW.OutputWindowPanes.Add("A New Pane")
   ' Add a line of text to the new pane and to the Task List.
   OWp.OutputTaskItemString("Some task", vsTaskPriority.vsTaskPriorityHigh, vsTaskCategories.vsTaskCategoryMisc, vsTaskIcon.vsTaskIconComment, "C:\temp", 100, "Some description")
   ' You can also use the 'True' flag on the end of OutputTaskItemString 
   ' rather than using the next line (ForceItemsToTaskList).
   OWp.ForceItemsToTaskList()
End Sub

Sicurezza di .NET Framework

Vedere anche

Riferimenti

OutputWindowPane Interfaccia

Spazio dei nomi EnvDTE