This project has moved. For the latest updates, please go here.

OnCapabilityValueNeeded

Invoked when the capability value need.

Syntax

protected virtual void OnCapabilityValueNeeded(CapabilityEventArgs e)

Parameters

  • e: Information about the capability that was changed.

Examples

protected override void OnCapabilityValueNeeded(CapabilityEventArgs e) {
    // ICAP_BITDEPTH
    // ICAP_XRESOLUTION
    // ICAP_YRESOLUTION
    for(var _cap = e.Capability.CapabilityInfo.Capability; this._Handlers.ContainsKey(_cap);) {
        this._Handlers[_cap](e.Capability);
        break;
    }

    // CAP_DEVICEONLINE
    switch(e.Capability.CapabilityInfo.Capability) {
        case TwCap.DeviceOnline:
            e.Capability.Value=this._Screen!=null;
            break;
    }

    base.OnCapabilityValueNeeded(e);
}


Last edited Sep 16, 2016 at 7:16 PM by SARAFF, version 1