Foodolini.Activities.Cookbook.RecipeViewer Class Reference

An activity that show a selected recipe. More...

Inherits Foodolini::Activities::IActivity.

Collaboration diagram for Foodolini.Activities.Cookbook.RecipeViewer:
Collaboration graph

List of all members.

Public Member Functions

 RecipeViewer ()
 Constructer that sets the images for rating and sets up the nodeview.
void SetParamenters (Recipe recipe)
 Method used to set the recipe to be viewed. Also views the detials of the recipe.
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.

Protected Member Functions

virtual void Build ()
virtual void OnDeleteRecipeClick (object sender, System.EventArgs e)
 Deletes the current recipe.
virtual void OnSbMultiplierChanged (object sender, System.EventArgs e)
 Changes the amounts on the ingredients according to the number of servings chosen.
virtual void RateRecipe (object sender, System.EventArgs e)
 Saves the selected rating on the Recipe. Buttons are changed according to rating. Rate on Recipe not implemented.
virtual void ShowBigVersion (object sender, System.EventArgs e)
 Opens a big version of the image in a new window.
virtual void OnConsumeClick (object sender, System.EventArgs e)
 Opens a dialog where the people who attended the meal can be selected, and saves this on the selected people. Any leftovers are stored.
virtual void EditRecipe (object sender, System.EventArgs e)
 Opens a RecipeEditor where the current recipe can be edited.
virtual void OnStoreClick (object sender, System.EventArgs e)
 Converts the recipe to a food item, and stores it Not Implemented.
virtual void OnBtnRecipe2ShoppingListClicked (object sender, System.EventArgs e)
virtual void OnBtnCloseViewClicked (object sender, System.EventArgs e)

Properties

Widget Widget [get]

Events

EventHandler< RecipeEventArgsOnRecipeViewed
EventHandler< RecipeEventArgsOnRecipeEdited
EventHandler< RecipeEventArgsOnRecipeDeleted

Private Member Functions

void CheckIngredients ()
void HandleDestroyed (object sender, EventArgs e)
 Destroy event that disposes all the images.
void SetRatingButtons (Gdk.Pixbuf px1, Gdk.Pixbuf px2, Gdk.Pixbuf px3, Gdk.Pixbuf px4, Gdk.Pixbuf px5)
 Set the pixbuffer on the images for rating.
void SetRating ()
void OwnerhandleCurrentUserChanged (object sender, PersonEventArgs e)
void CheckUser ()
void SetRecipeDetails ()
 Views the details of the recipe.
void HandleOnRecipeEdited (object sender, RecipeEventArgs e)
 Updates the RecipeViewer after being editted.

Private Attributes

Gtk.VBox bxViewRecipe
Gtk.HBox hbox2
Gtk.Label lbTitle
Gtk.Label lbTitle1
Gtk.Button BtnClose
Gtk.HBox hbox4
Gtk.Label label6
Gtk.SpinButton sbMultiplier
Gtk.ScrolledWindow GtkScrolledWindow
Gtk.NodeView nvIngredients
Gtk.Label label7
Gtk.ScrolledWindow GtkScrolledWindow1
Gtk.TextView tvViewRecipe
Gtk.HBox bxBottom
Gtk.VBox vbox2
Gtk.Table table3
Gtk.HBox hbox1
Gtk.Button btnStar1
Gtk.Button btnStar2
Gtk.Button btnStar3
Gtk.Button btnStar4
Gtk.Button btnStar5
Gtk.Label label1
Gtk.Label label2
Gtk.Label label4
Gtk.Label lbAverageRating
Gtk.Label lbDifficulty
Gtk.Label lbTime
Gtk.Table table1
Gtk.Button btnAdd2ShoppingList
Gtk.Button btnConsume
Gtk.Button btnDeleteRecipe
Gtk.Button btnEditRecipe
Gtk.Button btnStore
IOwner owner
Recipe recipe
Gdk.Pixbuf pxStarHide = Gdk.Pixbuf.LoadFromResource("StarHide.png")
Gdk.Pixbuf pxStar = Gdk.Pixbuf.LoadFromResource("Star.png")
NodeStore ingredientStorage = new NodeStore(typeof(IngredientAdapter))
Dictionary< Ingredient, double > ingredientSave = new Dictionary<Ingredient, double>()
List< FoodItemfooditemsStorage
Image star1
Image star2
Image star3
Image star4
Image star5
Image imgRecipeBigVersion
Button imgRecipe = new Button()
Window w = new Window(WindowType.Toplevel)

Detailed Description

An activity that show a selected recipe.

Definition at line 14 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.


Constructor & Destructor Documentation

Foodolini.Activities.Cookbook.RecipeViewer.RecipeViewer (  ) 

Constructer that sets the images for rating and sets up the nodeview.

Definition at line 37 of file RecipeViewer.cs.


Member Function Documentation

virtual void Foodolini.Activities.Cookbook.RecipeViewer.Build (  )  [protected, virtual]
void Foodolini.Activities.Cookbook.RecipeViewer.CheckIngredients (  )  [private]

Definition at line 92 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.CheckUser (  )  [private]

Definition at line 267 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.EditRecipe ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Opens a RecipeEditor where the current recipe can be edited.

Definition at line 415 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.HandleDestroyed ( object  sender,
EventArgs  e 
) [private]

Destroy event that disposes all the images.

Definition at line 133 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.HandleOnRecipeEdited ( object  sender,
RecipeEventArgs  e 
) [private]

Updates the RecipeViewer after being editted.

Definition at line 426 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.OnBtnCloseViewClicked ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Definition at line 480 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.OnBtnRecipe2ShoppingListClicked ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Definition at line 474 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.OnConsumeClick ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Opens a dialog where the people who attended the meal can be selected, and saves this on the selected people. Any leftovers are stored.

Definition at line 382 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.OnDeleteRecipeClick ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Deletes the current recipe.

Definition at line 149 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.OnSbMultiplierChanged ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Changes the amounts on the ingredients according to the number of servings chosen.

Definition at line 166 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.OnStoreClick ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Converts the recipe to a food item, and stores it Not Implemented.

Definition at line 441 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.OwnerhandleCurrentUserChanged ( object  sender,
PersonEventArgs  e 
) [private]

Definition at line 262 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.RateRecipe ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Saves the selected rating on the Recipe. Buttons are changed according to rating. Rate on Recipe not implemented.

Definition at line 175 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.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 457 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.SetParamenters ( Recipe  recipe  ) 

Method used to set the recipe to be viewed. Also views the detials of the recipe.

Parameters:
recipe A Recipe

Definition at line 216 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.SetRating (  )  [private]

Definition at line 236 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.SetRatingButtons ( Gdk.Pixbuf  px1,
Gdk.Pixbuf  px2,
Gdk.Pixbuf  px3,
Gdk.Pixbuf  px4,
Gdk.Pixbuf  px5 
) [private]

Set the pixbuffer on the images for rating.

Definition at line 227 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.SetRecipeDetails (  )  [private]

Views the details of the recipe.

Definition at line 289 of file RecipeViewer.cs.

virtual void Foodolini.Activities.Cookbook.RecipeViewer.ShowBigVersion ( object  sender,
System.EventArgs  e 
) [protected, virtual]

Opens a big version of the image in a new window.

Definition at line 367 of file RecipeViewer.cs.

void Foodolini.Activities.Cookbook.RecipeViewer.Unregister (  ) 

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

Implements Foodolini.Activities.IActivity.

Definition at line 462 of file RecipeViewer.cs.


Member Data Documentation

Definition at line 24 of file RecipeViewer.cs.

Definition at line 285 of file RecipeViewer.cs.

Definition at line 31 of file RecipeViewer.cs.

Dictionary<Ingredient, double> Foodolini.Activities.Cookbook.RecipeViewer.ingredientSave = new Dictionary<Ingredient, double>() [private]

Definition at line 23 of file RecipeViewer.cs.

Definition at line 22 of file RecipeViewer.cs.

Definition at line 18 of file RecipeViewer.cs.

Gdk.Pixbuf Foodolini.Activities.Cookbook.RecipeViewer.pxStar = Gdk.Pixbuf.LoadFromResource("Star.png") [private]

Definition at line 21 of file RecipeViewer.cs.

Gdk.Pixbuf Foodolini.Activities.Cookbook.RecipeViewer.pxStarHide = Gdk.Pixbuf.LoadFromResource("StarHide.png") [private]

Definition at line 20 of file RecipeViewer.cs.

Definition at line 19 of file RecipeViewer.cs.

Definition at line 26 of file RecipeViewer.cs.

Definition at line 27 of file RecipeViewer.cs.

Definition at line 28 of file RecipeViewer.cs.

Definition at line 29 of file RecipeViewer.cs.

Definition at line 30 of file RecipeViewer.cs.

Window Foodolini.Activities.Cookbook.RecipeViewer.w = new Window(WindowType.Toplevel) [private]

Definition at line 363 of file RecipeViewer.cs.


Property Documentation

Widget Foodolini.Activities.Cookbook.RecipeViewer.Widget [get]

Implements Foodolini.Activities.IActivity.

Definition at line 467 of file RecipeViewer.cs.


Event Documentation

EventHandler<RecipeEventArgs> Foodolini.Activities.Cookbook.RecipeViewer.OnRecipeDeleted

Definition at line 90 of file RecipeViewer.cs.

EventHandler<RecipeEventArgs> Foodolini.Activities.Cookbook.RecipeViewer.OnRecipeEdited

Definition at line 89 of file RecipeViewer.cs.

EventHandler<RecipeEventArgs> Foodolini.Activities.Cookbook.RecipeViewer.OnRecipeViewed

Definition at line 88 of file RecipeViewer.cs.


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

Foodolini 1.0.0 Documentation, generated with DoxyGen.