Foodolini.Activities.ShoppingList.ShoppingListActivity Class Reference

Inherits Foodolini::Activities::IActivity.

Collaboration diagram for Foodolini.Activities.ShoppingList.ShoppingListActivity:
Collaboration graph

List of all members.

Public Member Functions

 ShoppingListActivity ()
void Register (IOwner owner)
 Subscribe to the events exposed by owner, and store a reference to owner.
void Unregister ()
 Unsubscribe to the events exposed by owner, and loose any references to owner.
void AddRecipe (Recipe recipe, double servings)
 Add all ingredients needed for the recipe to the shoppinglist.

Protected Member Functions

virtual void Build ()
virtual void OnBtnClearActivated (object sender, System.EventArgs e)
virtual void OnBtnAddIngredientClicked (object sender, System.EventArgs e)
virtual void OnBtnPrintClicked (object sender, System.EventArgs e)
 Prints the shopping shoppingList.
virtual void OnBtnCookbookClicked (object sender, System.EventArgs e)
 Goes to the cookbook activity.
virtual void OnBtnDeleteClicked (object sender, System.EventArgs e)
 Deletes an item from the shopping shoppingList.
virtual void OnShoppingListViewerCursorChanged (object sender, System.EventArgs e)
virtual void OnShoppingListViewerRowActivated (object o, Gtk.RowActivatedArgs args)
 Changes the ingredient in shoppinglist item.

Properties

Widget Widget [get]

Private Member Functions

void OwnerhandleCurrentUserChanged (object sender, PersonEventArgs e)
void LoadShoppingListData ()
 Loads shopping list data for the current user and binds the data to the treeview.
void SetDeleteButtonState ()
void ShowIngredientAlreadyAddedMessage ()

Private Attributes

Gtk.VBox vbox2
Gtk.ScrolledWindow GtkScrolledWindow
Gtk.NodeView shoppingListViewer
Gtk.HBox hbox1
Gtk.Button btnCookbook
Gtk.Button btnAddIngredient
Gtk.Button btnPrint
Gtk.Button btnDelete
Gtk.Button btnClear
NodeStore shoppingListStore
Foodolini.BusinessLogic.ShoppingList shoppingList
Person currentUser
IOwner owner

Detailed Description

Definition at line 14 of file Foodolini.Activities.ShoppingList.ShoppingListActivity.cs.


Constructor & Destructor Documentation

Foodolini.Activities.ShoppingList.ShoppingListActivity.ShoppingListActivity (  ) 

Definition at line 20 of file ShoppingListActivity.cs.


Member Function Documentation

void Foodolini.Activities.ShoppingList.ShoppingListActivity.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.

Definition at line 122 of file ShoppingListActivity.cs.

virtual void Foodolini.Activities.ShoppingList.ShoppingListActivity.Build (  )  [protected, virtual]
void Foodolini.Activities.ShoppingList.ShoppingListActivity.LoadShoppingListData (  )  [private]

Loads shopping list data for the current user and binds the data to the treeview.

Definition at line 77 of file ShoppingListActivity.cs.

virtual void Foodolini.Activities.ShoppingList.ShoppingListActivity.OnBtnAddIngredientClicked ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Definition at line 101 of file ShoppingListActivity.cs.

virtual void Foodolini.Activities.ShoppingList.ShoppingListActivity.OnBtnClearActivated ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Definition at line 95 of file ShoppingListActivity.cs.

virtual void Foodolini.Activities.ShoppingList.ShoppingListActivity.OnBtnCookbookClicked ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Goes to the cookbook activity.

Parameters:
sender 
e 

Definition at line 291 of file ShoppingListActivity.cs.

virtual void Foodolini.Activities.ShoppingList.ShoppingListActivity.OnBtnDeleteClicked ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Deletes an item from the shopping shoppingList.

Parameters:
sender 
e 

Definition at line 301 of file ShoppingListActivity.cs.

virtual void Foodolini.Activities.ShoppingList.ShoppingListActivity.OnBtnPrintClicked ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Prints the shopping shoppingList.

Parameters:
sender 
e 

Definition at line 135 of file ShoppingListActivity.cs.

virtual void Foodolini.Activities.ShoppingList.ShoppingListActivity.OnShoppingListViewerCursorChanged ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Definition at line 317 of file ShoppingListActivity.cs.

virtual void Foodolini.Activities.ShoppingList.ShoppingListActivity.OnShoppingListViewerRowActivated ( object  o,
Gtk.RowActivatedArgs  args 
) [protected, virtual]

Changes the ingredient in shoppinglist item.

Parameters:
o A System.Object
args A Gtk.RowActivatedArgs

Definition at line 331 of file ShoppingListActivity.cs.

void Foodolini.Activities.ShoppingList.ShoppingListActivity.OwnerhandleCurrentUserChanged ( object  sender,
PersonEventArgs  e 
) [private]

Definition at line 61 of file ShoppingListActivity.cs.

void Foodolini.Activities.ShoppingList.ShoppingListActivity.Register ( IOwner  owner  ) 

Subscribe to the events exposed by owner, and store a reference to owner.

Parameters:
owner Instance of an implementation of IOwner

Implements Foodolini.Activities.IActivity.

Definition at line 32 of file ShoppingListActivity.cs.

void Foodolini.Activities.ShoppingList.ShoppingListActivity.SetDeleteButtonState (  )  [private]

Definition at line 309 of file ShoppingListActivity.cs.

void Foodolini.Activities.ShoppingList.ShoppingListActivity.ShowIngredientAlreadyAddedMessage (  )  [private]

Definition at line 347 of file ShoppingListActivity.cs.

void Foodolini.Activities.ShoppingList.ShoppingListActivity.Unregister (  ) 

Unsubscribe to the events exposed by owner, and loose any references to owner.

Implements Foodolini.Activities.IActivity.

Definition at line 89 of file ShoppingListActivity.cs.


Member Data Documentation

Definition at line 18 of file ShoppingListActivity.cs.

Definition at line 30 of file ShoppingListActivity.cs.

Definition at line 17 of file ShoppingListActivity.cs.

Definition at line 16 of file ShoppingListActivity.cs.


Property Documentation

Widget Foodolini.Activities.ShoppingList.ShoppingListActivity.Widget [get]

Implements Foodolini.Activities.IActivity.

Definition at line 26 of file ShoppingListActivity.cs.


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

Foodolini 1.0.0 Documentation, generated with DoxyGen.