This commit is contained in:
Gregory Diaz 2015-07-16 10:47:27 -07:00
commit 3c77679531
10 changed files with 61 additions and 44 deletions

View file

@ -227,6 +227,7 @@ namespace MatterHackers.MatterControl
public RootedObjectEventHandler ReloadAdvancedControlsPanelTrigger = new RootedObjectEventHandler();
public RootedObjectEventHandler CloudSyncStatusChanged = new RootedObjectEventHandler();
public RootedObjectEventHandler DoneReloadingAll = new RootedObjectEventHandler();
public RootedObjectEventHandler PluginsLoaded = new RootedObjectEventHandler();
public delegate string GetSessionInfoDelegate();

View file

@ -104,15 +104,23 @@ namespace MatterHackers.MatterControl
this.Padding = new BorderDouble(0, 0, 6, 0);
UiThread.RunOnIdle(() =>
if (AddRightElement != null)
{
if (AddRightElement != null)
{
AddRightElement(rightElement);
}
}, 1);
AddRightElement(rightElement);
}
// When the application is first started, plugins are loaded after the MainView control has been initialize,
// and such they not around when this constructor executes. In that case, we run the AddRightElement
// delegate after the plugins get initialized via the PluginsLoaded event
ApplicationController.Instance.PluginsLoaded.RegisterEvent(PluginsLoaded, ref unregisterEvents);
}
public void PluginsLoaded(object sender, EventArgs e)
{
if (AddRightElement != null)
{
AddRightElement(rightElement);
}
}
public override void OnClosed(EventArgs e)