is it able to serve the reason of closing the window?

I’m developing a plug-in for Smart Client.

ViewItemPlugin.Close() is called due to either logoff or termination. but I can not get the exact reason. I need to know why close() is called.

I am using a library that demand two constraints.

The first one is that it should be initialized and uninitialized at the same thread . and the second one is that it should be called one time.

Added in MIP SDK 2017R2 and Smart Client 2017R2 you can now get an event when the whole Smart Client closes:

--

virtual EventHandler VideoOS.Platform.ClientControl.ApplicationCloseEvent

Subscribe to this event to be notified when the application is about to be shut down.

Generally it is a better idea to do cleanup in the Close() methods as these will be called whenever the application is no longer logged on to the VMS and thus configuration might no longer be valid, but if you have some cleanup that should only be done when the application is actually shutting down, this is the place to do it.

Only do basic cleanup here. Don’t attempt to access any UI or utilize MIP functionality in general here, as a lot of that will already be gone at this point.

The event is only supported in Smart Client and Management Client.

--

I hope this is what you seek.

Thanks, Bo.