I need to develop a plugin that can display overlay only on specific Monitor and position, is there a way to get this information from ClientControl.NewImageViewerControlHandler(NewImageViewerControlEvent) ?
The ImageViewerAddOn you get includes imageViewerAddOn.WindowInformation.WindowId;
This is the Id of the Window. If you get the Window item there is location and size among the properties.
To test this I modified the Analytics Overlay plugin sample like this:
/// <summary>
/// A new ImageViewer has been created
/// </summary>
/// <param name="imageViewerAddOn"></param>
void NewImageViewerControlEvent(VideoOS.Platform.Client.ImageViewerAddOn imageViewerAddOn)
{
lock (_activeImageViewerAddOns)
{
String tx = "null";
if (imageViewerAddOn.WindowInformation != null)
{
tx = "" + imageViewerAddOn.WindowInformation.WindowId;
Item item = Configuration.Instance.GetItem(imageViewerAddOn.WindowInformation.WindowId, Kind.Window);
string position = item.Properties["Location.X"];
}
I did not see information on the Monitor, I suspect it is because I only have one monitor. (Working from home (because of Covid-19) I do not have access to test with a second monitor on the PC.) If you do not find a way to get the information on the monitor used while working with this please let me know..
Sorry the question might not be clear enough @Bo Ellegård Andersen (Milestone Systems) .
If i’m not mistaken, in the SmartClient the Window contains a ViewAndLayoutItem.
There is multiple ViewItems displayed, and for example if the view is (1+1), there is two ViewItem position.
So in my case i want to be able to say on a view with multiple viewitems that if the viewItem is in position 1 display overlay but if it’s in the second position do not display overlay. So if the camera is displayed in the two differents position only the one in position 1 will display the Overlay.
Therefore when listening for NewImageViewerControlEvent if it’s in the right ViewItem Position i can create my overlay.
Hope that’s more understandable
We are sorry but many developers are out of office due to vacation. We will get back to you as soon as we have updates from them. Sorry for the inconvenience.
While trying to investigate this my memory was triggered, I might have a previous answer that can help.
If it does not fit or does not work let me know, let me know what you have tried and what you experienced..