示例#1
0
        static void Main(string[] args)
        {
            InputReader  iReader = new InputReader();
            PersonalData personalData;
            RFCExtractor rFCExtractor;
            string       nombres, apPaterno, apMaterno;
            DateTime     birthday;
            char         continueP = 'n';

            do
            {
                Console.Clear();
                Console.WriteLine("##--Random Generator Test--##");

                nombres   = iReader.ReadString("Nombre(s): ", 2);
                apPaterno = iReader.ReadString("Apellido paterno: ", 2);
                apMaterno = iReader.ReadString("Apellido materno: ", 2);

                //-- InputReader test
                birthday = iReader.ReadBirthday();

                personalData = new PersonalData(nombres, apPaterno, apMaterno, birthday);
                rFCExtractor = new RFCExtractor(personalData);

                Console.WriteLine($"RFC: {rFCExtractor.GenerateRFC()}");
                Console.WriteLine("¿Desea generar otro RFC? [y/n]: ");
                continueP = Console.ReadKey().KeyChar;
            } while (Char.ToLower(continueP).Equals('y'));

            Console.WriteLine("\n\tHasta la próxima. Gracias por utilizar RFCGenerator v1.0-Beta by Erick Escamilla Charco");
            Thread.Sleep(1500);
        }
示例#2
0
 public RFCExtractor(PersonalData personalData)
 {
     cUtils        = new CharUtils();
     _rGenerator   = new RandomGenerator();
     _personalData = personalData;
 }