Exemple #1
0
        private void extractAllToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fold = new FolderBrowserDialog();

            fold.Description = "Select the directory to save the files to";
            if (fold.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            for (int i = 0; i < _tpf.GetNumEntries(); i++)
            {
                ZipReader.ZipEntryFull ent = _tpf.GetEntry(i);
                ent.Extract(false, Path.Combine(fold.SelectedPath, ent.Filename));
            }
        }
        public TPFView(TPFExtract tpf)
        {
            InitializeComponent();

            _tpf = tpf;
            for (int i = 0; i < _tpf.GetNumEntries(); i++)
            {
                listBox1.Items.Add(_tpf.GetEntry(i).Filename);
            }

            uint unc = 0;
            uint cpr = 0;
            for (int i = 0; i < _tpf.GetNumEntries(); i++)
            {
                unc += _tpf.GetEntry(i).UncomprSize;
                cpr += _tpf.GetEntry(i).ComprSize;
            }
            rtb4.Text = "TPF File Info\n\nFilename: " + _tpf.GetFilename() + "\nStored Files: " + _tpf.GetNumEntries() + "\nAverage Compression Ratio: " +
                ((float)cpr / unc) + "\nComment:\n" + _tpf.GetComment();
        }
Exemple #3
0
        public TPFView(TPFExtract tpf)
        {
            InitializeComponent();

            _tpf = tpf;
            for (int i = 0; i < _tpf.GetNumEntries(); i++)
            {
                listBox1.Items.Add(_tpf.GetEntry(i).Filename);
            }

            uint unc = 0;
            uint cpr = 0;

            for (int i = 0; i < _tpf.GetNumEntries(); i++)
            {
                unc += _tpf.GetEntry(i).UncomprSize;
                cpr += _tpf.GetEntry(i).ComprSize;
            }
            rtb4.Text = "TPF File Info\n\nFilename: " + _tpf.GetFilename() + "\nStored Files: " + _tpf.GetNumEntries() + "\nAverage Compression Ratio: " +
                        ((float)cpr / unc) + "\nComment:\n" + _tpf.GetComment();
        }