Ejemplo n.º 1
0
        Picture GetImageForPrefix(PersonPrefix prefix, string fullName)
        {
            Picture res = null;

            if (fullName == "Samantha Bright")
            {
                prefix = PersonPrefix.Ms;
            }
            else if (fullName == "Ed Holmes")
            {
                prefix = PersonPrefix.Mr;
            }
            else if (fullName == "Ken Samuelson")
            {
                prefix = PersonPrefix.Mr;
            }
            else if (fullName == "Billy Zimmer")
            {
                return(null);
            }
            if (prefix == PersonPrefix.Mr)
            {
                res = currentMalePictures[random.Next(0, currentMalePictures.Count - 1)];
                currentMalePictures.Remove(res);
            }
            else if (prefix == PersonPrefix.Ms || prefix == PersonPrefix.Mrs || prefix == PersonPrefix.Miss)
            {
                res = currentFemalePictures[random.Next(0, currentFemalePictures.Count - 1)];
                currentFemalePictures.Remove(res);
            }
            return(res); // Dr
        }
 public void Assign(ContactItemViewModel contact)
 {
     this.Name.Assign(contact.Name);
     this.Photo = contact.Photo;
     this.Address.Assign(contact.Address);
     this.Email     = contact.Email;
     this.Phone     = contact.Phone;
     this.BirthDate = contact.BirthDate;
     this.Prefix    = contact.Prefix;
     this.Notes     = contact.Notes;
 }