private void LoadPreloadedFiles(List <ObjectTreeNode> nodes)
        {
            ProgressWindow.Start(() =>
            {
                foreach (var node in nodes)
                {
                    ProgressWindow.Update($"Opening {ArchiveFileInfo.FileName}", 0, true);

                    ArchiveFileInfo.FileFormat = ArchiveFileInfo.OpenFile();
                    if (ArchiveFileInfo.FileFormat != null)
                    {
                        var fileNode = ObjectListWrapperLoader.OpenFormat(new ImageList(), ArchiveFileInfo.FileFormat);
                        node.Tag     = ArchiveFileInfo.FileFormat;
                        foreach (var child in fileNode.Children)
                        {
                            AddChild(child);
                        }
                    }
                }

                ProgressWindow.Wait(1000);
                ProgressWindow.Update($"Finished!", 100);
                ProgressWindow.CloseProgressBar();
            });
        }
Esempio n. 2
0
 private void ExtractFiles(string folder, List <ArchiveFileInfo> archiveFiles)
 {
     for (int i = 0; i < archiveFiles.Count; i++)
     {
         var counter = (i * 100) / archiveFiles.Count;
         ProgressWindow.Update($"Extracting {archiveFiles[i].FileName}", counter);
         archiveFiles[i].FileWrite($"{folder}/{archiveFiles[i].FileName}");
     }
     ProgressWindow.Wait(1000);
     ProgressWindow.Update($"Finished!", 100);
     ProgressWindow.CloseProgressBar();
 }
        private void ExportToFileLocAction(object sender, EventArgs args)
        {
            string folder   = ((IFileFormat)ArchiveFile).FileInfo.FolderPath;
            string filePath = Path.Combine(folder, Label);

            Console.WriteLine($"filePath {filePath}");

            ProgressWindow.Start(() =>
            {
                ArchiveFileInfo.FileWrite(filePath);
                ProgressFinished();
            });
            ProgressWindow.Update($"Exporting {Label}", 0, true);
        }
Esempio n. 4
0
 public static void SetProgressBar(string text, int amount, bool continuous = false)
 {
     ProgressWindow.Update(text, amount, continuous);
 }