Пример #1
0
 public void NewMessageToPerson(string phrase)
 {
     try
     {
         view.PersonMessage(person.Talk(phrase));
     }
     catch (NullReferenceException)
     {
         view.InformMessage("No person in conversation");
     }
 }
Пример #2
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());
        }