Пример #1
0
        public Kid KidGenerator()
        {
            Kid randKid = new Kid {
                Gender = (Sex)rnd.Next(0, 2)
            };
            Generator g = new Generator();

            randKid.Name = g.GenerateDefault(randKid.Gender == Sex.female ? Gender.woman : Gender.man);
            randKid.Name = randKid.Name.Replace("<center><b><font size=7>", "").Replace("\n", "").Replace("</font></b></center>", "");
            randKid.Name = randKid.Name.Substring(1, randKid.Name.Length - 1);
            //age and dateburth generator
            randKid.Age = rnd.Next(0, 16);
            //randKid.DateOfBurth = GenerateBirthDate(randKid);
            IdGeneratorForAdults id = new IdGeneratorForAdults();

            randKid.Ids.Add(id.IdGenerator());
            return(randKid);
        }
Пример #2
0
        public Adult AdultGenerator()
        {
            Adult randAdult = new Adult {
                Gender = (Sex)rnd.Next(0, 2)
            };
            //name generator
            Generator g = new Generator();

            randAdult.Name = g.GenerateDefault(randAdult.Gender == Sex.female ? Gender.woman : Gender.man);
            randAdult.Name = randAdult.Name.Replace("<center><b><font size=7>", "").Replace("\n", "").Replace("</font></b></center>", "");
            randAdult.Name = randAdult.Name.Substring(1, randAdult.Name.Length - 1);
            //age and dateburth generator
            randAdult.Age = rnd.Next(16, 100);
            //randAdult.DateOfBurth=GenerateBirthDate(randAdult);
            IdGeneratorForAdults id = new IdGeneratorForAdults();

            randAdult.Ids.Add(id.IdGenerator());
            return(randAdult);
        }