using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.ComponentModel;

// For Font, Color, and DialogResult.
//using System.Drawing;
//using System.Windows.Forms;

namespace CustomTypeConverter
{
    class Person
    {
        // The PropertyGrid provides extra support for the following.
        //public DialogResult Result { get; set; }
        //public Font FavoriteFont { get; set; }
        //public Color HairColor { get; set; }
        
        [Description("The person's first or given name")]
        [Category("Name")]
        public string FirstName { get; set; }

        [Description("The person's last or family name")]
        [Category("Name")]
        public string LastName { get; set; }

        [Description("The person's street address")]
        [Category("Contact Info")]
        public StreetAddress Address { get; set; }

        [Description("The person's primary email address")]
        [Category("Contact Info")]
        public string Email { get; set; }

        [Description("The person's business phone number")]
        [Category("Contact Info")]
        public string Phone { get; set; }

        // Return the Person as a string for display purposes.
        public override string ToString()
        {
            return FirstName + " " + LastName;
        }
    }
}
