次の方法で共有


PropertyGridObject コンストラクター

定義

PropertyGridObject クラスの新しいインスタンスを初期化します。

オーバーロード

PropertyGridObject(ModulePropertiesPage)

PropertyGridObject クラスの新しいインスタンスを初期化します。

PropertyGridObject(ModulePropertiesPage, Boolean)

プロパティが読み取り専用かどうかを示す クラスの PropertyGridObject 新しいインスタンスを初期化します。

PropertyGridObject(ModulePropertiesPage)

PropertyGridObject クラスの新しいインスタンスを初期化します。

protected:
 PropertyGridObject(Microsoft::Web::Management::Client::Win32::ModulePropertiesPage ^ page);
protected PropertyGridObject (Microsoft.Web.Management.Client.Win32.ModulePropertiesPage page);
new Microsoft.Web.Management.Client.PropertyGridObject : Microsoft.Web.Management.Client.Win32.ModulePropertiesPage -> Microsoft.Web.Management.Client.PropertyGridObject
Protected Sub New (page As ModulePropertiesPage)

パラメーター

page
ModulePropertiesPage

クラスから派生し、コンストラクターを ModulePropertiesPage 呼び出す オブジェクト。

次の例では、 クラスから派生したコンストラクターを PropertyGridObject 実装します。

注釈

このコンストラクターは コンストラクターを PropertyGridObject(ModulePropertiesPage, Boolean) 呼び出し、 パラメーターに falsereadOnly 渡します。

適用対象

PropertyGridObject(ModulePropertiesPage, Boolean)

プロパティが読み取り専用かどうかを示す クラスの PropertyGridObject 新しいインスタンスを初期化します。

protected:
 PropertyGridObject(Microsoft::Web::Management::Client::Win32::ModulePropertiesPage ^ page, bool readOnly);
protected PropertyGridObject (Microsoft.Web.Management.Client.Win32.ModulePropertiesPage page, bool readOnly);
new Microsoft.Web.Management.Client.PropertyGridObject : Microsoft.Web.Management.Client.Win32.ModulePropertiesPage * bool -> Microsoft.Web.Management.Client.PropertyGridObject
Protected Sub New (page As ModulePropertiesPage, readOnly As Boolean)

パラメーター

page
ModulePropertiesPage

クラスから派生し、コンストラクターを ModulePropertiesPage 呼び出す オブジェクト。

readOnly
Boolean

true プロパティが読み取り専用であることを示す場合は 。 false プロパティが読み取り/書き込みであることを示す場合は 。

次の例では、 クラスから派生したコンストラクターを PropertyGridObject 実装します。

internal class CustomPageMPP : ModulePropertiesPage {
//
protected override void ProcessProperties(
    PropertyBag properties) {

    _bag = properties;
    _clone = _bag.Clone(ReadOnly);
    CustomPropertiesInfo info =
        (CustomPropertiesInfo)TargetObject;

    if (info == null) {
        info = new CustomPropertiesInfo(this, _clone);
        TargetObject = info;
    } else {
        info.Initialize(_clone);
    }

    ClearDirty();
}
internal class CustomPropertiesInfo : PropertyGridObject {

    private PropertyBag _bag;

    public CustomPropertiesInfo(
        ModulePropertiesPage page,
        PropertyBag bag)
        : base(page) {

        Initialize(bag);
    }

    public CustomPropertiesInfo(
        ModulePropertiesPage page,
        PropertyBag bag,
        bool bRO)
        : base(page, bRO) {

        Initialize(bag);
    }

    internal void Initialize(PropertyBag bag) {
        _bag = bag;
        TrcData();
    }

    bool GetBoolProp(SH.PropInt pi) {

        object o = _bag[pi.Indx];
        if (o == null)
            return false;

        return (bool)o;
    }

適用対象