00001 00002 using System; 00003 using Foodolini.BusinessLogic; 00004 using Gtk; 00005 00006 namespace Foodolini.Activities 00007 { 00011 public interface IOwner 00012 { 00016 event EventHandler<PersonEventArgs> CurrentUserChanged; 00017 00021 Person CurrentUser{ get; } 00022 00032 IActivity PushActivity(string activity); 00033 00040 T PushActivity<T>() where T : class, new(); 00041 00051 bool PopActivity(); 00052 00067 bool LoadActivity(string activity); 00068 00072 void ToggleShoppingList(bool state); 00073 00077 bool HomeActivity(); 00078 00079 Window Window{get;} 00080 00081 void UpdateUserList(); 00082 00091 event EventHandler<ActivityUnloadedArgs> ActivityUnloading; 00092 00100 void AddRecipe(Recipe recipe, double servings); 00101 } 00102 00103 00107 public class PersonEventArgs : EventArgs 00108 { 00109 public Person Person { get; private set; } 00110 public PersonEventArgs(Person person) 00111 { 00112 this.Person = person; 00113 } 00114 } 00115 00119 public class ActivityUnloadedArgs : EventArgs{ 00123 public bool Unload{get; set;} 00124 00128 public IActivity Activity{get; private set;} 00129 00136 public ActivityUnloadedArgs(IActivity activity){ 00137 this.Unload = true; 00138 this.Activity = activity; 00139 } 00140 } 00141 00142 }