Fire OnCloseTool when exiting the application

Nov 27, 2014 at 2:23 PM
It would be great if XrmToolbox could fire an "OnCloseTool" event to all open plugins when closing, in a similar way that the ConnectionUpdated is fired when a new organization is connected.

Then you could be sure that you always (unless something crashes) get the message that the plugin is being closed, to be able to write settings to file, close other files or connections etc.

Possible?
Developer
Dec 2, 2014 at 10:13 PM
In some cases, the dispose method will get called, in other cases it won't. I added a checkin that should go out with the latest build that should ensure that the dispose method will always get called on the plugin when it's tab is closed. This would allow you a hook (albeit not too friendly) to use when saving your settings.

I've talked to Tanguy and we are looking at the possibility of actually updating the Plugin Interface to allow for a Plugin_Closing type method to allow plugin developers to have a legit hook to use. We would handle it in the PluginBase, but anyone who has a plugin that just implements the interface would break.
Dec 3, 2014 at 6:55 AM
From my perspective an update to the PluginBase would be just fine ;)

Just to be clear - what I am really after is that it also gets called (for all open plugins) when the XrmToolbox is closed with the "X", without manually closing each plugin.
Coordinator
Dec 3, 2014 at 8:17 AM
We can definitively implement this kind of behavior