private void bwDupeFinder_ProgressChanged(object sender, ProgressChangedEventArgs e) { if (CurrentState == Building_FileList) { ShowProgress("Building file list... ", "Files found: " + BuildingCounter.ToString("###,###,##0"), 0); } else if (CurrentState == PERFORMING_CALCULATIONS) { ShowProgress("Determining file sizes...", "Files found: " + BuildingCounter.ToString("###,###,##0"), 0); } else { if (e.ProgressPercentage == 0) { progressBar1.ShowPercentage = true; progressBar1.Text = ""; progressBar1.Maximum = mainFileList.Count(); } if (Errors.Count > 0) { ShowProgress("Location: " + currentlyWorkingPath, "Duplicates found: " + DupesFound.ToString("###,###,##0") + " (" + general.SexySize((long)SpaceSaveable) + ")", e.ProgressPercentage, "", "Files searched: " + TotalSearched.ToString("###,###,##0"), "Errors: " + Errors.Count.ToString()); } else { ShowProgress("Location: " + currentlyWorkingPath, "Duplicates found: " + DupesFound.ToString("###,###,##0") + " (" + general.SexySize((long)SpaceSaveable) + ")", e.ProgressPercentage, "", "Files searched: " + TotalSearched.ToString("###,###,##0")); } } }
// Constructor; use this if the settings are passed in as regular parameters public ZoningSimulator(int[] bldgSizes, float[] occWeights, int zoningID = -1, string zoningName = "unnamed_zoning") { ZoningID = zoningID; ZoningName = zoningName; _bldgCounter = new BuildingCounter(bldgSizes); _occCounter = new Counter(0); _occManager = new OccupantManager(occWeights); }