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
在 [精靈] 下拉式方塊中的項目數。
實作
範例
// 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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.VisualStudio.VsWizard 命名空間