示例#1
0
        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;
                }
            }
        }
示例#2
0
        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);
        }
示例#3
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();
        }