Making the queue a file folder
This commit is contained in:
parent
5bbf1b7ca1
commit
048e20b659
8 changed files with 81 additions and 622 deletions
|
|
@ -864,15 +864,25 @@ namespace MatterHackers.MatterControl
|
|||
forceAddQueue = true;
|
||||
#endif
|
||||
// only add the queue if there are items in it
|
||||
var queueItems = QueueData.Instance.PrintItems.ToList();
|
||||
if (forceAddQueue || queueItems.Any())
|
||||
var queueDirectory = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, "Queue");
|
||||
LegacyQueueFiles.ImportFromLegacy(queueDirectory);
|
||||
if (forceAddQueue || Directory.Exists(queueDirectory))
|
||||
{
|
||||
this.Library.RegisterContainer(
|
||||
new DynamicContainerLink(
|
||||
"Print Queue".Localize(),
|
||||
// make sure the queue directory exists
|
||||
Directory.CreateDirectory(queueDirectory);
|
||||
|
||||
this.Library.RegisterContainer(new DynamicContainerLink(
|
||||
"Queue".Localize(),
|
||||
StaticData.Instance.LoadIcon(Path.Combine("Library", "folder.png")),
|
||||
StaticData.Instance.LoadIcon(Path.Combine("Library", "queue_icon.png")),
|
||||
() => new PrintQueueContainer()));
|
||||
() => new FileSystemContainer(queueDirectory)
|
||||
{
|
||||
UseIncrementedNameDuringTypeChange = true,
|
||||
DefaultSort = new LibrarySortBehavior()
|
||||
{
|
||||
SortKey = SortKey.ModifiedDate,
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
this.Library.DesignAppsCollectionContainer = new DesignAppsCollectionContainer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue