- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a several IUpdaters in my add-in of which a user can disable or enable by clicking an associated button. For example, there is a pushbutton A for IUpdaterA, which the Push Button image shows the status of the IUpdater.
On PushButton Click:
if (UpdaterRegistry.IsUpdaterRegistered(updater.GetUpdaterId()))
{
UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId());
pushButtonA.LargeImage = Off;
}
else
{
UpdaterRegistry.RegisterUpdater(updater);
UpdaterRegistry.EnableUpdater(updater.GetUpdaterId());
//Add Triggers, etc. (omitted here for conciseness)
pushButtonA.LargeImage = On;
}
This works fine when the user manually clicks and turns on or off the IUpdater. However, when something during the session or project environment causes the IUpdater execution to fail throwing an error, the button does not respond to re-enabling the IUpdater after it has been disabled:
So (2) questions:
1) When this error is thrown and disable Updater is clicked, is there a way to tie this back to change the pushButtonA img to OFF?
2) As seen in the code, UpdaterRegistry.EnableUpdater() is used but it doesn't seem to enable the IUpdater back up after it has been disabled through the error dialog. How can one re-enable it?
*This is not to say one should always want to re-enable a disabled IUpdater as there was a reason it was disabled, but in some cases under discretion it may be due to something resolvable like loading in a missing family that was needed, etc. In those situations it would be ideal to resolve the missing item, and re-enable the IUpdater back up.
Thank you.
Solved! Go to Solution.