IDecoderManagerSetDisplayLayout Method |  |
Sets display layout for provided decoder.
Namespace: Bosch.Vms.SDKAssembly: Bosch.Vms.SDK (in Bosch.Vms.SDK.dll) Version: 1.9.0.0
Syntax
Exceptions| Exception | Condition |
|---|
| SdkException |
Thrown if decoder doesn't exist in the configuration or is not permitted to caller.
Thrown if displayLayout is not supported.
|
Remarks Tip |
|---|
|
Feature is only available for decoder monitor panes which are assigned to any Monitor Group.
To find out which layouts can be applied to a certain decoder, an SDK application or script can use GetSupportedDisplayLayouts(Decoder) and pick one of the DisplayLayout objects from the collection returned by that method.
|
Example
To enable SingleView mode, a list of supported layouts should be retrieved and filtered to get corresponding
DisplayLayout.
When retrieved, it could be set by
SetDisplayLayout(Decoder, DisplayLayout):
try
{
Decoder decoder = decoderManager.GetDecoderByName("Monitor 1 (1.1.1.1) (1));
IList<DisplayLayout> supportedLayouts = decoderManager.GetSupportedDisplayLayouts(decoder);
DisplayLayout singleViewLayout = supportedLayouts.FirstOrDefault(x => x.CameoCount == 1);
if (singleViewLayout != null)
{
decoderManager.SetDisplayLayout(decoder, singleViewLayout);
}
}
catch (SdkException)
{
}
See Also