مشاركة عبر


OutputWindowPane.OutputTaskItemString أسلوب

تعرض سلسلة في الإطار إخراج وقم بإضافة عنصر المقابلة إلى قائمة المهام.

مساحة الاسم:  EnvDTE
التجميع:  EnvDTE (في EnvDTE.dll)

بناء الجملة

'إقرار
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
)

المعلمات

  • Text
    النوع: System.String
    مطلوبة.نص الذي ترغب في إضافة إلى إخراج نافذة.
  • SubCategory
    النوع: System.String
    مطلوبة.فئة فرعية إلى استخدامه لعنصر مهمة جديد.
  • Icon
    النوع: EnvDTE.vsTaskIcon
    مطلوبة.vsTaskIconثابت يمثل الرمز إلى لاستخدامه الجديدة مهمة العنصر.
  • FileName
    النوع: System.String
    مطلوبة.ملف اسم ليتم اقترانه بعنصر مهمة جديد.يمكن أن تكون سلسلة فارغ.
  • Line
    النوع: System.Int32
    مطلوبة.السطر من تعليمات برمجية إلى التي تتعلق بعنصر مهمة جديد.
  • Description
    النوع: System.String
    مطلوبة.وصف مهمة الجديدة العنصر.
  • Force
    النوع: System.Boolean
    اختياري.الإشارة إلى ما إذا كان يجب تحديث الإطار إخراج مباشرة قائمة مهمة .القيمة الافتراضية هي True.إذا كنت تقوم بإضافة عدة عناصر، قم بتعيين ضغط إلى False، ثم قم بتعيين ضغط Trueتشغيل العنصر أخير.

ملاحظات

لأرقام الأسطر إلى تظهر في قائمة المهام، يجب تحديد مسار الكامل في FileNameمعلمة. (على سبيل المثال، c:\workملف.txt.) ملف يجب أن تكون موجودة في هذا الموقع. هو السبب في ذلك أن الإطار إخراج التحقق للتأكد من وجود الملف المحدد قبل عرض أرقام الأسطر.

أمثلة

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

أمن NET Framework.

راجع أيضًَا

المرجع

OutputWindowPane واجهة

OutputWindowPane الأعضاء

EnvDTE مساحة الاسم