The interface an activity use to interface the main window. More...
Inherited by Foodolini.Main.MainWindow.
Public Member Functions | |
IActivity | PushActivity (string activity) |
Push an activity onto the activity stack, and display it. | |
T | PushActivity< T > () |
Push an activity of type T onto the activity stack, and display it. | |
bool | PopActivity () |
Pop the top-most activity, and make the next activity on the stack visible, go-to home if no activity is next. | |
bool | LoadActivity (string activity) |
Load an activity, unloads the entire activity stack. | |
void | ToggleShoppingList (bool state) |
Toggles the ShoppingList. If expanded, it will be collapsed, and if collapsed it will be expanded. | |
bool | HomeActivity () |
Goto the home activity. | |
void | UpdateUserList () |
void | AddRecipe (Recipe recipe, double servings) |
Add all ingredients needed for the recipe to the shoppinglist. | |
Properties | |
Person | CurrentUser [get] |
Gets the current user. | |
Window | Window [get] |
Events | |
EventHandler< PersonEventArgs > | CurrentUserChanged |
Occurs when the current user is changed. | |
EventHandler < ActivityUnloadedArgs > | ActivityUnloading |
Occurs when an activity is unloading. |
The interface an activity use to interface the main window.
Definition at line 11 of file IOwner.cs.
void Foodolini.Activities.IOwner.AddRecipe | ( | Recipe | recipe, | |
double | servings | |||
) |
Add all ingredients needed for the recipe to the shoppinglist.
This is all ingredients, and does not depend on what is on storage. If the nature of the shoppinglist is changed in the future, this may change.
Implemented in Foodolini.Main.MainWindow.
bool Foodolini.Activities.IOwner.HomeActivity | ( | ) |
Goto the home activity.
Implemented in Foodolini.Main.MainWindow.
bool Foodolini.Activities.IOwner.LoadActivity | ( | string | activity | ) |
Load an activity, unloads the entire activity stack.
If calling from the top-most activity and this method returns true, beaware that the Widget of your activity have been destoryed. Also note that this method unload the activity stack from the top of the stack, if an activity along the way chooses not to unload this activity will be top-most and shown.
activity | The Activity to load |
Implemented in Foodolini.Main.MainWindow.
bool Foodolini.Activities.IOwner.PopActivity | ( | ) |
Pop the top-most activity, and make the next activity on the stack visible, go-to home if no activity is next.
If calling from the top-most activity and this method returns true, beaware that the Widget of your activity have been destoryed.
Implemented in Foodolini.Main.MainWindow.
IActivity Foodolini.Activities.IOwner.PushActivity | ( | string | activity | ) |
Push an activity onto the activity stack, and display it.
activity | Activity to stack |
Implemented in Foodolini.Main.MainWindow.
T Foodolini.Activities.IOwner.PushActivity< T > | ( | ) |
Push an activity of type T onto the activity stack, and display it.
Implemented in Foodolini.Main.MainWindow.
T | : | class | |
T | : | new() |
void Foodolini.Activities.IOwner.ToggleShoppingList | ( | bool | state | ) |
Toggles the ShoppingList. If expanded, it will be collapsed, and if collapsed it will be expanded.
Implemented in Foodolini.Main.MainWindow.
void Foodolini.Activities.IOwner.UpdateUserList | ( | ) |
Implemented in Foodolini.Main.MainWindow.
Person Foodolini.Activities.IOwner.CurrentUser [get] |
Gets the current user.
Implemented in Foodolini.Main.MainWindow.
Window Foodolini.Activities.IOwner.Window [get] |
Implemented in Foodolini.Main.MainWindow.
EventHandler<ActivityUnloadedArgs> Foodolini.Activities.IOwner.ActivityUnloading |
Occurs when an activity is unloading.
Do only handle this is the Activity referenced in the arguments is the activity you are in. Be careful about changing the Unload property of the event arguments as this will cause the unload to fail.
Implemented in Foodolini.Main.MainWindow.
EventHandler<PersonEventArgs> Foodolini.Activities.IOwner.CurrentUserChanged |
Occurs when the current user is changed.
Implemented in Foodolini.Main.MainWindow.