Foodolini.Activities.IOwner Interface Reference

The interface an activity use to interface the main window. More...

Inherited by Foodolini.Main.MainWindow.

List of all members.

Public Member Functions

IActivity PushActivity (string activity)
 Push an activity onto the activity stack, and display it.
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< PersonEventArgsCurrentUserChanged
 Occurs when the current user is changed.
EventHandler
< ActivityUnloadedArgs
ActivityUnloading
 Occurs when an activity is unloading.

Detailed Description

The interface an activity use to interface the main window.

Definition at line 11 of file IOwner.cs.


Member Function Documentation

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.

Parameters:
activity The Activity to load
Returns:
True, if activity exists and activity stack could be unloaded

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.

Returns:
True, if activity could be unloaded

Implemented in Foodolini.Main.MainWindow.

IActivity Foodolini.Activities.IOwner.PushActivity ( string  activity  ) 

Push an activity onto the activity stack, and display it.

Parameters:
activity Activity to stack
Returns:
The activity that was created or null of not found

Implemented in Foodolini.Main.MainWindow.

T Foodolini.Activities.IOwner.PushActivity< T > (  ) 

Push an activity of type T onto the activity stack, and display it.

Returns:
The activity that was created or null of not found

Implemented in Foodolini.Main.MainWindow.

Type Constraints
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.


Property Documentation

Person Foodolini.Activities.IOwner.CurrentUser [get]

Gets the current user.

Implemented in Foodolini.Main.MainWindow.

Definition at line 21 of file IOwner.cs.

Window Foodolini.Activities.IOwner.Window [get]

Implemented in Foodolini.Main.MainWindow.

Definition at line 79 of file IOwner.cs.


Event Documentation

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.

Definition at line 91 of file IOwner.cs.

EventHandler<PersonEventArgs> Foodolini.Activities.IOwner.CurrentUserChanged

Occurs when the current user is changed.

Implemented in Foodolini.Main.MainWindow.

Definition at line 16 of file IOwner.cs.


The documentation for this interface was generated from the following file:

Foodolini 1.0.0 Documentation, generated with DoxyGen.