private void LoadFiles() { var files = Directory.GetFiles(_dirPath); _lstFiles = new List <string>(); CntViborka = 0; foreach (var filePath in files) { if (BaseParams.IsGoodFile(filePath)) { _lstFiles.Add(filePath); var bp = new BaseParams(filePath); CntViborka += bp.CntViborka; } } }
public void LoadFiles() { var files = Directory.GetFiles(_oldDir); _lstOldFiles = new List <string>(); CntOldViborka = 0; for (int i = 0; i < files.Length; i++) { if (BaseParams.IsGoodFile(files[i])) { _lstOldFiles.Add(files[i]); var bp = new BaseParams(files[i]); CntOldViborka += bp.CntViborka; ChangePerc(Convert.ToInt32(i * 100.0 / files.Length)); } } ChangePerc(0); }
public GenerationRass(string oldDirPath) { var oldDir = oldDirPath; _newDir = Directory.GetParent(oldDir).FullName; var files = Directory.GetFiles(oldDir); _lstOldFiles = new List <string>(); _oldCntViborka = 0; foreach (var filePath in files) { if (BaseParams.IsGoodFile(filePath)) { _lstOldFiles.Add(filePath); var bp = new BaseParams(filePath); _oldCntViborka += bp.CntViborka; } } _rnd = new Random(); }