void DoAddToSpecificLibrary(SaveAsWindow.SaveAsReturnInfo returnInfo) { if (returnInfo != null) { List <QueueRowItem> selectedItems = new List <QueueRowItem>(queueDataView.SelectedItems); LibraryProvider libraryToSaveTo = returnInfo.destinationLibraryProvider; if (libraryToSaveTo != null) { foreach (QueueRowItem queueItem in selectedItems) { if (File.Exists(queueItem.PrintItemWrapper.FileLocation)) { PrintItemWrapper printItemWrapper = new PrintItemWrapper(new PrintItem(queueItem.PrintItemWrapper.PrintItem.Name, queueItem.PrintItemWrapper.FileLocation), returnInfo.destinationLibraryProvider.GetProviderLocator()); libraryToSaveTo.AddItem(printItemWrapper); } } libraryToSaveTo.Dispose(); } } }
void DoAddToSpecificLibrary(SaveAsWindow.SaveAsReturnInfo returnInfo) { if (returnInfo != null) { LibraryProvider libraryToSaveTo = returnInfo.destinationLibraryProvider; if (libraryToSaveTo != null) { foreach (var queueItemIndex in QueueData.Instance.SelectedIndexes) { var queueItem = queueDataView.GetQueueRowItem(queueItemIndex); if (queueItem != null) { if (File.Exists(queueItem.PrintItemWrapper.FileLocation)) { PrintItemWrapper printItemWrapper = new PrintItemWrapper(new PrintItem(queueItem.PrintItemWrapper.PrintItem.Name, queueItem.PrintItemWrapper.FileLocation), returnInfo.destinationLibraryProvider.GetProviderLocator()); libraryToSaveTo.AddItem(printItemWrapper); } } } libraryToSaveTo.Dispose(); } } }