} // End Function public void AutoUppercaseLowercase(List<string> charsetSelecting, string pathBackupFiles, string extension, bool zip) { Interface.PleaseWait(); Utility make = new Utility(); make.Setting_UpFile(pathBackupFiles, extension); foreach (var item in charsetSelecting) { make.WorkFile.WriteLine(ConverterInUppercaseLowercase(item.ToString())); } make.WorkFile.Close(); extension = make.Zipper(zip, pathBackupFiles); make.GenerateOut(pathBackupFiles, extension); } // End Function
/// <summary> /// retun a list random of string /// </summary> /// <param name="charsetSelecting"></param> /// <param name="numberLine"></param> /// <param name="numberOfAllCombination"></param> /// <param name="saveFile"></param> /// <param name="zip"></param> /// <param name="numberOfChar"></param> /// <param name="filePath"></param> /// <param name="extension"></param> public void GenerateRandomString(List<string> charsetSelecting, BigInteger numberLine, bool saveFile, BigInteger numberOfAllCombination, bool zip, int numberOfChar, string pathBackUpFiles, string extension) { Utility make = new Utility(); BigInteger cpt = 0; if (saveFile) { BigInteger iMakeFile = 0; while (numberOfAllCombination >= cpt) { if (iMakeFile == 0) { make.Setting_UpFile(pathBackUpFiles,extension); } make.WorkFile.WriteLine(Aleatory(charsetSelecting, numberOfChar)); ++iMakeFile; ++cpt; if (iMakeFile >= numberLine || cpt >= numberOfAllCombination) { make.WorkFile.Flush(); make.WorkFile.Close(); extension=make.Zipper(zip, pathBackUpFiles); make.GenerateOut(pathBackUpFiles,extension); iMakeFile = 0; } } } else { while (cpt <= numberOfAllCombination) { if (cpt >= numberLine & numberLine != 0) Environment.Exit(0); Console.WriteLine(Aleatory(charsetSelecting, numberOfChar)); cpt++; } } }