MainWindow Class Reference

Inherits Foodolini::Activities::IOwner.

Collaboration diagram for MainWindow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MainWindow ()
void AddRecipe (Recipe recipe, double servings)
 Add all ingredients needed for the recipe to the shoppinglist.
void UpdateUserList ()
IActivity PushActivity (string activity)
 Load an activity and put on top of the activity stack.
PushActivity< T > ()
 Load an activity and put on top of the activity stack.
bool LoadActivity (string activity)
 Unloades the activity stack and load on activity.
bool PopActivity ()
 Pop the top of the activity stack, and set the next activity, uses "Home" if stack is empty.
bool HomeActivity ()
 Tries to load the home activity.
void ToggleShoppingList (bool state)
 Toggles the ShoppingList. If expanded, it will be collapsed, and if collapsed it will be expanded.

Protected Member Functions

virtual void Build ()
virtual void OnHomeButtonClicked (object sender, System.EventArgs e)
virtual void OnBtnShowHideShoppingListClicked (object sender, System.EventArgs e)

Properties

Person CurrentUser [get]
 The currently selected user, null if None or Anonymous.
Gtk.Window Window [get]
 Get the main window from IOwner.

Events

EventHandler< PersonEventArgsCurrentUserChanged
 Occurs when the current user is changed.
EventHandler
< ActivityUnloadedArgs
ActivityUnloading
 Occurs when an activity is unloading.

Detailed Description

Definition at line 13 of file MainWindow.cs.


Constructor & Destructor Documentation

MainWindow.MainWindow (  ) 

Definition at line 12 of file MainWindow.cs.

Here is the call graph for this function:


Member Function Documentation

void MainWindow.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.

Implements Foodolini.Activities.IOwner.

Definition at line 325 of file MainWindow.cs.

virtual void MainWindow.Build (  )  [protected, virtual]

Definition at line 53 of file MainWindow.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

bool MainWindow.HomeActivity (  ) 

Tries to load the home activity.

Returns:
True, if Home was loaded

Implements Foodolini.Activities.IOwner.

Definition at line 415 of file MainWindow.cs.

Here is the caller graph for this function:

bool MainWindow.LoadActivity ( string  activity  ) 

Unloades the activity stack and load on activity.

Parameters:
activity Activity to load
Returns:
True, if the activity stack could be unloaded

Implements Foodolini.Activities.IOwner.

Definition at line 379 of file MainWindow.cs.

virtual void MainWindow.OnBtnShowHideShoppingListClicked ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Definition at line 467 of file MainWindow.cs.

Here is the caller graph for this function:

virtual void MainWindow.OnHomeButtonClicked ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Definition at line 31 of file MainWindow.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

bool MainWindow.PopActivity (  ) 

Pop the top of the activity stack, and set the next activity, uses "Home" if stack is empty.

Returns:
True, if current activity could be unloaded

Implements Foodolini.Activities.IOwner.

Definition at line 399 of file MainWindow.cs.

IActivity MainWindow.PushActivity ( string  activity  ) 

Load an activity and put on top of the activity stack.

Parameters:
activity Activity to load
Returns:
The activity that was added, null if not found

Implements Foodolini.Activities.IOwner.

Definition at line 343 of file MainWindow.cs.

T MainWindow.PushActivity< T > (  ) 

Load an activity and put on top of the activity stack.

Returns:
The activity that was added, null if not found

Implements Foodolini.Activities.IOwner.

Type Constraints
T :class 
T :new() 
void MainWindow.ToggleShoppingList ( bool  state  ) 

Toggles the ShoppingList. If expanded, it will be collapsed, and if collapsed it will be expanded.

Implements Foodolini.Activities.IOwner.

Definition at line 461 of file MainWindow.cs.

void MainWindow.UpdateUserList (  ) 

Implements Foodolini.Activities.IOwner.

Definition at line 329 of file MainWindow.cs.


Property Documentation

Person MainWindow.CurrentUser [get]

The currently selected user, null if None or Anonymous.

Implements Foodolini.Activities.IOwner.

Definition at line 427 of file MainWindow.cs.

Gtk.Window MainWindow.Window [get]

Get the main window from IOwner.

Implements Foodolini.Activities.IOwner.

Definition at line 439 of file MainWindow.cs.


Event Documentation

EventHandler<ActivityUnloadedArgs> MainWindow.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.

Implements Foodolini.Activities.IOwner.

Definition at line 421 of file MainWindow.cs.

EventHandler<PersonEventArgs> MainWindow.CurrentUserChanged

Occurs when the current user is changed.

Implements Foodolini.Activities.IOwner.

Definition at line 420 of file MainWindow.cs.


The documentation for this class was generated from the following files:

Generated on Thu Dec 10 14:03:49 2009 for Foodolini by  doxygen 1.6.1