Пример #1
0
        private void button15_Click(object sender, EventArgs e)
        {
            progressBar1.Maximum = Directory.GetDirectories(@workDir.Text + @"\extract").Count();
            progressBar1.Value = 0;
            StuffFile s = new StuffFile();

            foreach (string StuffDir in Directory.GetDirectories(@workDir.Text + @"\extract"))
            {
                progress.Text = "Current file: " + StuffDir + ".stuff";
                Application.DoEvents();
                foreach (ListViewItem StuffArchive in stuffFiles.SelectedItems)
                {
                    if (Path.GetFileName(StuffArchive.SubItems[0].Text) == Path.GetFileName(StuffDir) + ".stuff")
                    {
                        s.Archive(@StuffDir, @destDir.Text + @"\" + Path.GetFileName(StuffDir) + ".stuff");
                    }
                }
                progressBar1.Value++;
            }
            progress.Text = "Idle";
        }
Пример #2
0
        //Where is button 1? This seem to be the same as button15. Remove it if it's a mistake.
        private void button1_Click(object sender, EventArgs e)
        {
            progressBar1.Maximum = Directory.GetDirectories(@workDir.Text + @"\extract").Count();
            progressBar1.Value = 0;

            StuffFile s = new StuffFile();
            foreach (string StuffDir in Directory.GetDirectories(@workDir.Text + @"\extract"))
            {
                progress.Text = "Current file: " + StuffDir + ".stuff";
                Application.DoEvents();
                s.Archive(@StuffDir, @eveDir.Text + @"\" + Path.GetFileName(StuffDir) + ".stuff");
                progressBar1.Value++;
            }
            progress.Text = "Idle";
        }
Пример #3
0
        private void button14_Click(object sender, EventArgs e)
        {
            Int16 fileCount = 0;
            foreach (ListViewItem StuffArchive in stuffFiles.SelectedItems)
            {
                if (StuffArchive.SubItems[0].Text.ToLower().EndsWith(".stuff"))
                {
                    fileCount++;
                }
            }

            progressBar1.Maximum = fileCount;
            progressBar1.Value = 0;
            StuffFile s = new StuffFile();
            foreach (ListViewItem StuffArchive in stuffFiles.SelectedItems)
            {
                if (StuffArchive.SubItems[0].Text.ToLower().EndsWith(".stuff"))
                {
                    progress.Text = "Current file: " + StuffArchive.SubItems[0].Text + ".stuff";
                    Application.DoEvents();
                    s.Extract(StuffArchive.SubItems[0].Text, @workDir.Text + @"\extract\" + Path.GetFileNameWithoutExtension(StuffArchive.SubItems[0].Text));
                    progressBar1.Value++;
                }
            }
            progress.Text = "Idle";
        }