Пример #1
0
 public void SetParams(params string[] parametres)
 {
     try
     {
         PrincessProperties proprties = parser.Parse(parametres);
         princess = new Princess(proprties.Number, proprties.Name, Convert.ToByte(proprties.Age), proprties.HairColor, proprties.EyeColor);
     }
     catch
     {
         messager.ShowMessage("Entred data is not valid!");
     }
 }
        public Princess Parse(string cmd)
        {
            princessProps = parser.Parse(cmd);

            return(new Princess(princessProps.Number, princessProps.Name, Convert.ToByte(princessProps.Age), princessProps.HairColor, princessProps.EyeColor));
        }