public UserDebugViewer(User user) { InitializeComponent(); tb_Name.Text = user.Name; tb_Title.Text = user.Title; pb_Picture.Image = user.Picture; }
static void Main(string[] args) { User developer = new User { Name = "fresky", Title = "Developer", Email = "*****@*****.**", Address = Convert.ToBase64String(Encoding.ASCII.GetBytes("China")), Picture = Image.FromFile(@"..\..\Penguins.jpg"), }; developer.AddSkill("C#"); developer.AddSkill("C++"); developer.AddSkill("Jave"); Console.WriteLine(developer.GetBussinessCard()); Console.ReadKey(); }
public UserProxy(User u) { this.Name = string.Format("{0}--{1}", u.Name, u.Title); this.Email = u.Email; this.Address = GetPlainAddress(u.Address); this.Skills = u.GetSkills(); }