public void MergePackFileContainer(PackFileContainer other)
 {
     foreach (var item in other.FileList)
     {
         FileList[item.Key] = item.Value;
     }
     return;
 }
        public void UpdateAllDataSourcesAfterSave()
        {
            // Load pack
            using var fileStram = File.OpenRead(SystemFilePath);
            using var reader    = new BinaryReader(fileStram, Encoding.ASCII);
            var pack = new PackFileContainer(SystemFilePath, reader);

            foreach (var currentFile in FileList)
            {
                var loadedFile = pack.FileList[currentFile.Key];
                (currentFile.Value as PackFile).DataSource = (loadedFile as PackFile).DataSource;
            }
        }
        public void RemovePackFile(PackFileContainer pf)
        {
            var canUnload = BeforePackFileContainerRemoved?.Invoke(pf);

            if (canUnload.HasValue == false || (canUnload.HasValue == true && canUnload.Value == true))
            {
                PackFiles.Remove(pf);

                if (PackSelectedForEdit == pf)
                {
                    PackSelectedForEdit = null;
                }

                PackFileContainerRemoved?.Invoke(pf);
            }
        }
 public void TriggerPackFileFolderRemoved(PackFileContainer container, string path)
 {
     PackFileFolderRemoved?.Invoke(container, path);
 }
 public void TriggerPackFileRemoved(PackFileContainer container, List <PackFile> files)
 {
     PackFilesRemoved?.Invoke(container, files);
 }
 public void TriggerContainerUpdated(PackFileContainer container)
 {
     ContainerUpdated?.Invoke(container);
 }
 public void AddPackFile(PackFileContainer pf)
 {
     PackFiles.Add(pf);
     PackFileContainerLoaded?.Invoke(pf);
 }