All products / Saraff.Twain.DS / Contents
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);
}