00001 using System; 00002 using Gtk; 00003 using Foodolini.BusinessLogic; 00004 using Foodolini.Activities; 00005 00006 namespace Foodolini.Activities.Cookbook 00007 { 00011 [TreeNode (ListOnly = true)] 00012 public class PersonAdapter : TreeNode 00013 { 00023 public PersonAdapter(Person person, double percentageEaten) 00024 { 00025 this.Person = person; 00026 this.PercentageEaten = percentageEaten; 00027 } 00028 00035 public PersonAdapter(Person person) 00036 { 00037 this.Person = person; 00038 } 00039 00043 [Gtk.TreeNodeValue (Column=0)] 00044 public string Name{ 00045 get{ 00046 return this.Person.FullName; 00047 } 00048 } 00049 00053 [Gtk.TreeNodeValue (Column=2)] 00054 public string UserName{ 00055 get{ 00056 return this.Person.UserName; 00057 } 00058 } 00059 00063 [Gtk.TreeNodeValue (Column=1)] 00064 public double PercentageEaten{ get; set;} 00065 00069 public Person Person{get; private set;} 00070 } 00071 }