void execute_compression(params string[] extensions) { List <String> files = new List <string>(); Console.WriteLine("Collecting all " + String.Join(" ", extensions) + " files"); foreach (string ext in extensions) { Utilities.getFiles(_dir, files, ext); } Console.WriteLine("Minifying " + files.Count + " " + String.Join(" ", extensions) + " files"); Minifier mini = new Minifier() { Backup = false }; int count = 0; foreach (string file in files) { _saved += mini.Minify(file); Console.WriteLine("Minifying {0}/{1}...", ++count, files.Count); } Console.WriteLine("Finished Minifying all " + String.Join(" ", extensions) + " files"); }
void execute_compression(params string[] extensions) { List <String> files = new List <string>(); lbl_status.Text = "Collecting all " + String.Join(" ", extensions) + " files"; Application.DoEvents(); foreach (string ext in extensions) { Utilities.getFiles(txt_folder.Text, files, ext); } lbl_status.Text = "Minifying " + files.Count + " " + String.Join(" ", extensions) + " files"; Application.DoEvents(); progress.Value = 0; progress.Maximum = files.Count; Minifier mini = new Minifier() { Backup = chk_backup.Checked }; foreach (string file in files) { _saved += mini.Minify(file); progress.Value = progress.Value + 1; Application.DoEvents(); } }