/// <summary>
        /// Converts each model from the specified collection to <see cref="ExtractableItem"/>
        /// and navigates to <see cref="DecompressionSummaryPage"/> afterwards.
        /// </summary>
        /// <param name="models">The models to be converted.</param>
        /// <param name="node">The currently active node that holds equivalents of the models.</param>
        internal void ExtractSelectedEntriesButtonAction(ICollection <BrowseArchivePageModel> models, Node node)
        {
            var entries = new List <FileEntry>(models.Count);

            foreach (var model in models)
            {
                foreach (var child in node.Children)
                {
                    if (child.Name.Equals(model.DisplayName))
                    {
                        if (child is FileEntry entry)
                        {
                            entries.Add(entry);
                            break;
                        }
                    }
                }
            }
            if (entries.Count > 0)
            {
                IsNavigating = true;
                var item = new ExtractableItem(_archiveFile.Name, _archiveFile, entries);
                ParentPage.Frame.Navigate(typeof(DecompressionSummaryPage), new[] { item });
            }
        }
        /// <summary>
        /// Navigates to <see cref="DecompressionSummaryPage"/> with the archive
        /// file (<see cref="_archiveFile"/>) as a parameter.
        /// </summary>
        public void ExtractWholeArchiveButtonAction()
        {
            IsNavigating = true;
            var item = new ExtractableItem(_archiveFile.Name, _archiveFile);

            ParentPage.Frame.Navigate(typeof(DecompressionSummaryPage), new[] { item });
        }
示例#3
0
 internal DecompressionInfo(ExtractableItem item, ulong size) : base(size)
 {
     Item = item;
 }