Example #1
0
        public void CloseArchiveEditor()
        {
            if (verifyResult != null)
            {
                if (!verifyResult.IsDisposed)
                {
                    verifyResult.Close();
                }
            }

            archive.Dispose();

            Program.MainForm.CloseArchiveEditor(this);
            Close();
        }
Example #2
0
 private void AddFolder(string folderPath)
 {
     foreach (string s in Directory.GetFiles(folderPath))
     {
         if (Path.GetExtension(s).ToLower() == ".hip" || Path.GetExtension(s).ToLower() == ".hop")
         {
             ArchiveEditorFunctions archive = new ArchiveEditorFunctions();
             archive.OpenFile(s);
             WriteWhatIFound(archive);
             archive.Dispose();
         }
     }
     foreach (string s in Directory.GetDirectories(folderPath))
     {
         AddFolder(s);
     }
 }
 private void AddFolder(string folderPath, ref Platform scoobyPlatform)
 {
     foreach (string s in Directory.GetFiles(folderPath))
     {
         if (Path.GetExtension(s).ToLower() == ".hip" || Path.GetExtension(s).ToLower() == ".hop")
         {
             ArchiveEditorFunctions archive = new ArchiveEditorFunctions();
             archive.OpenFile(s, false, scoobyPlatform, out _, true);
             if (scoobyPlatform == Platform.Unknown)
             {
                 scoobyPlatform = archive.platform;
             }
             WriteWhatIFound(archive);
             archive.Dispose(false);
         }
     }
     foreach (string s in Directory.GetDirectories(folderPath))
     {
         AddFolder(s, ref scoobyPlatform);
     }
 }
Example #4
0
        private void buttonPerform_Click(object sender, EventArgs e)
        {
            List <string> fileList = new List <string>();

            AddFolder(rootDir, ref fileList);

            progressBar1.Minimum = 0;
            progressBar1.Maximum = fileList.Count;
            progressBar1.Value   = 0;
            progressBar1.Step    = 1;

            Dictionary <(DynaType, int, int), int> dynas = new Dictionary <(DynaType, int, int), int>();

            foreach (string s in fileList)
            {
                progressBar1.PerformStep();

                ArchiveEditorFunctions archive = new ArchiveEditorFunctions();
                archive.OpenFile(s, false, Platform.Unknown, true);
                Check(archive, ref dynas);
                archive.Dispose(false);
            }

            List <string> output = new List <string>();

            foreach (var v in dynas.Keys)
            {
                output.Add($"{v.Item1.ToString()} - v{v.Item2} - {v.Item3} bytes - {dynas[v]} inst\n");
            }

            richTextBox1.Clear();
            foreach (var s in output.OrderBy(f => f))
            {
                richTextBox1.AppendText(s);
            }
        }