public void DoProcessingInfo(ProcessingInfo pi) { if (!pi.isEmpty) { //toolStripStatusLabelProcessingFileText.Text = pi.currentFile; toolStripProgressBarFileProcessing.Maximum = pi.totalNumberOfFiles; toolStripProgressBarFileProcessing.Value = pi.currentFileNumber; } }
public Boolean RunProfileOnFilesSingle() { int currentFileNumber = 1; foreach (string inFile in listOfFiles) { IsRunning(true); this.pi = new ProcessingInfo(inFile, pi.currentFileNumber, listOfFiles.Length); this.parent.DoProcessingInfo(pi); DoProcessingInfo(pi); currentFileNumber++; RunProfileOnFiles(inFile, textBoxOutputFilename.Text, (int)numericUpDownRPM.Value); IsRunning(false); this.parent.removeFilesFromList(inFile); } return(true); }
public Boolean RunProfileOnFilesMulti() { int currentFileNumber = 1; int totalnumberofturns = 0; foreach (ListViewItem lvi in listViewMutiProfiles.Items) { totalnumberofturns += int.Parse(lvi.SubItems[2].Text); } totalnumberofturns = totalnumberofturns * listOfFiles.Length; foreach (string inFile in listOfFiles) { IsRunning(true); this.pi = new ProcessingInfo(inFile, this.pi.currentFileNumber, totalnumberofturns); this.parent.DoProcessingInfo(pi); DoProcessingInfo(pi); currentFileNumber++; String outputfile = ""; foreach (ListViewItem lvi in listViewMutiProfiles.Items) { this.pt = DeserializeFromXML(lvi.Text); SetProfileSettingsOnItems(); if (Boolean.Parse(lvi.SubItems[1].Text) && listViewMutiProfiles.Items.IndexOf(lvi) > 0) { outputfile = RunProfileOnFiles(outputfile, pt.defaultOutput, int.Parse(lvi.SubItems[2].Text)); } else { outputfile = RunProfileOnFiles(inFile, pt.defaultOutput, int.Parse(lvi.SubItems[2].Text)); } } IsRunning(false); this.parent.removeFilesFromList(inFile); } return(true); }
void DoProcessingInfo(ProcessingInfo pi) { progressBarProcessingProgress.Maximum = pi.totalNumberOfFiles; progressBarProcessingProgress.Value = pi.currentFileNumber; }