WizComboClass.Count 属性

获取项的计数在指定的向导组合框中。

命名空间:  Microsoft.VisualStudio.VsWizard
程序集:  Microsoft.VisualStudio.VsWizard(在 Microsoft.VisualStudio.VsWizard.dll 中)

语法

声明
Public Overridable ReadOnly Property Count As Integer
public virtual int Count { get; }
public:
virtual property int Count {
    int get ();
}
abstract Count : int with get
override Count : int with get
function get Count () : int

属性值

类型:System.Int32
的项数。向导组合框中。

实现

IWizCombo.Count

示例

// From the Visual C++ Add Method wizard.

function EnableDisableControls(bStock)
{
   if (bStock)
   {
      window.external.AddSymbol("DISPID_DISABLED", true);
      INTERNAL_NAME.disabled = true;
      PARAMETER_NAME.disabled = true;
      PARAMETER_TYPE.Enabled = false;
      INTERNAL_NAME_LABEL.disabled = true;
      PARAMETER_NAME_LABEL.disabled = true;
      PARAMETER_TYPE_LABEL.disabled = true;

      PARAMETERS.length = 0;
      INTERNAL_NAME.value = "";
      RETURN_TYPE_LIST.ListIndex = RETURN_TYPE_LIST.Count - 1;
      RETURN_TYPE_LIST.Enabled = false;
      RETURN_TYPE_LABEL.disabled = true;
   }
   else
   {
      window.external.AddSymbol("DISPID_DISABLED", false);
      INTERNAL_NAME.disabled = false;
      PARAMETER_NAME.disabled = false;
      PARAMETER_TYPE.Enabled = true;
      INTERNAL_NAME_LABEL.disabled = false;
      PARAMETER_NAME_LABEL.disabled = false;
      PARAMETER_TYPE_LABEL.disabled = false;

      INTERNAL_NAME.value = STOCK_METHODS.Value;
      var strInterfaceType = window.external.FindSymbol("INTERFACE_TYPE");
      var bLocalAttrib = window.external.FindSymbol("LOCAL_ATTRIB");
      if (strInterfaceType == "dispinterface" || (strInterfaceType == "custom" && bLocalAttrib))
      {
         RETURN_TYPE_LIST.Enabled = true;
         RETURN_TYPE_LABEL.disabled = false;
      }
   }
   ToggleButtons();
}

.NET Framework 安全性

请参见

参考

WizComboClass 类

Microsoft.VisualStudio.VsWizard 命名空间

其他资源

设计向导

Visual C++ 扩展性对象模型