Load projects during zenOn startup
I have an app like service always running on the system when windows starts.
With a timer the app check if zenOn is online with the usual following code:
this.zenOnApplication = Marshal.GetActiveObject("zenOn.Application") as zenOn.Application;
if (this.zenOnApplication.VersionNumber >= 6500)
{
this.zenOnApplication.OnClose += new zenOn.DApplicationEvents_OnCloseEventHandler(zenOnApplication_OnClose);
if (this.loadProjects())
{
this.ZenOnIsOnline = true;
//.....
}
else
this.ZenOnIsOnline = false;
}
The loadProjects() function just loads some internal dictionaries based on the projects...
We have a multiproject zenOn application.
The question is when zenOn runtime starts it get an unpredictable time to load all the projects (more time if they are network remote project) so you can get succesfully the zenOn Application object (with Marshall) but the property Application.Projects() has different data depending on the time you check....
So my problem is to have just like a property or dynproperty that say me when all the projects are loaded in the application object... Some ideas?
This is a migrated post! Originally posted on 20.08.2012 by user matteo.fabbri. Please be aware that information can be outdated.