مشاركة عبر


Command.IsAvailable الخاصية

الحصول القيمة تشير إلى ما إذا كان Commandهو ممكن حاليا.

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

بناء الجملة

'إقرار
ReadOnly Property IsAvailable As Boolean
    Get
bool IsAvailable { get; }
property bool IsAvailable {
    bool get ();
}
abstract IsAvailable : bool
function get IsAvailable () : boolean

قيمة الخاصية

النوع: System.Boolean
قيمة منطقية تشير إلى trueإذا كان الأمر هو تمكين حاليا؛ otherwهوe، false.

أمثلة

' Macro code.
Sub IsAvailableExample()
   ' Before running, you must add a reference to
   ' Microsoft.VisualStudio.CommandBars.
   Dim cmds As Commands
   Dim cmdobj As Command
   Dim customin, customout As Object
   Dim colAddins As AddIns

   ' Set references.
   colAddins = DTE.AddIns()
   cmds = DTE.Commands
   cmdobj = cmds.Item("File.NewFile")

   ' List some of the command properties.
   MsgBox("Command Name: " & cmdobj.Name)
   MsgBox("Is Command Available?: " & cmdobj.IsAvailable)
   MsgBox("Command ID: " & cmdobj.ID)
   MsgBox("Command GUID: " & cmdobj.Guid)
End Sub

أمن NET Framework.

راجع أيضًَا

المرجع

Command واجهة

Command الأعضاء

EnvDTE مساحة الاسم