Making the bread crumbs be a portable widget.

This commit is contained in:
Lars Brubaker 2015-07-30 17:42:58 -07:00
parent 46a8d63c39
commit 79fa6f3db8
15 changed files with 1132 additions and 106 deletions

View file

@ -46,6 +46,7 @@ namespace MatterHackers.MatterControl.PrintLibrary.Provider
{
public class LibraryProviderSelector : LibraryProvider
{
Action<LibraryProvider> setCurrentLibraryProvider;
private List<LibraryProvider> libraryProviders = new List<LibraryProvider>();
internal LibraryProvider PurchasedLibrary { get; private set; }
@ -54,9 +55,10 @@ namespace MatterHackers.MatterControl.PrintLibrary.Provider
List<ImageBuffer> folderImagesForChildren = new List<ImageBuffer>();
public LibraryProviderSelector()
public LibraryProviderSelector(Action<LibraryProvider> setCurrentLibraryProvider)
: base(null)
{
this.setCurrentLibraryProvider = setCurrentLibraryProvider;
ApplicationController.Instance.CloudSyncStatusChanged.RegisterEvent(CloudSyncStatusChanged, ref unregisterEvents);
@ -138,7 +140,7 @@ namespace MatterHackers.MatterControl.PrintLibrary.Provider
if(e != null && !e.IsAuthenticated)
{
// Switch to the purchased library
LibraryDataView.CurrentLibraryProvider = this;
setCurrentLibraryProvider(this);
}
// Refresh state