00001 00002 using System; 00003 using Gtk; 00004 using Foodolini.Activities; 00005 using Foodolini.BusinessLogic; 00006 00007 namespace Foodolini.Activities 00008 { 00009 00010 [TreeNode (ListOnly = true)] 00011 public class ExerciseAdapter : TreeNode 00012 { 00013 00014 public ExerciseAdapter(Exercise exercise) 00015 { 00016 this.Exercise = exercise; 00017 } 00018 00019 [Gtk.TreeNodeValueAttribute(Column=0)] 00020 public string SportsActivityName { 00021 get{ return this.Exercise.Activity.Name;} 00022 } 00023 00024 [Gtk.TreeNodeValueAttribute(Column=1)] 00025 public TimeSpan Duration { 00026 get { 00027 return this.Exercise.Duration; 00028 } 00029 } 00030 00031 [Gtk.TreeNodeValueAttribute(Column=2)] 00032 public DateTime PerformedDate { 00033 get { 00034 return this.Exercise.PerformedDate; 00035 } 00036 } 00037 00038 public Exercise Exercise {get; private set;} 00039 } 00040 }