Exemplo n.º 1
0
        public void AddPerson(string name, uint age, int language)
        {
            Person.LanguageType type = (Person.LanguageType)language;
            if ((name == "") || (age <= 0))
            {
                GeneratePerson(out name, out age, out type);
            }

            person = new Person(name, age, type);

            view.InformMessage("You add person to conversation");
            view.PersonMessage(person.Talk());
        }
Exemplo n.º 2
0
 void GeneratePerson(out string name, out uint age, out Person.LanguageType type)
 {
     age  = (uint)random.Next(7, 90);
     type = (Person.LanguageType)(random.Next(0, 100) % 2);
     name = nameVariant[(int)type, random.Next(0, 4)];
 }