00001 00002 using System; 00003 using Gtk; 00004 using Foodolini.BusinessLogic; 00005 00006 namespace Foodolini.Activities.Cookbook 00007 { 00008 [TreeNode(ListOnly = true)] 00009 public class IngredientAdapter : TreeNode 00010 { 00011 00012 public IngredientAdapter (Ingredient ingredient, double quantity) 00013 { 00014 this.Ingredient = ingredient; 00015 this.Quantity = quantity; 00016 } 00017 00021 [Gtk.TreeNodeValue(Column = 0)] 00022 public string Name { 00023 get { return this.Ingredient.LongDescription; } 00024 } 00025 00029 [Gtk.TreeNodeValue(Column = 1)] 00030 public double Quantity {get; set;} 00031 00035 [Gtk.TreeNodeValue(Column = 2)] 00036 public string Storage {get; set;} 00037 00038 [Gtk.TreeNodeValue(Column = 3)] 00039 public string Expiration {get; set;} 00040 00044 public Ingredient Ingredient { get; private set; } 00045 } 00046 }