An activity that show a selected recipe. More...
Inherits Foodolini::Activities::IActivity.
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< RecipeEventArgs > | OnRecipeViewed |
EventHandler< RecipeEventArgs > | OnRecipeEdited |
EventHandler< RecipeEventArgs > | OnRecipeDeleted |
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< FoodItem > | fooditemsStorage |
Image | star1 |
Image | star2 |
Image | star3 |
Image | star4 |
Image | star5 |
Image | imgRecipeBigVersion |
Button | imgRecipe = new Button() |
Window | w = new Window(WindowType.Toplevel) |
An activity that show a selected recipe.
Definition at line 14 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
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.
virtual void Foodolini.Activities.Cookbook.RecipeViewer.Build | ( | ) | [protected, virtual] |
Definition at line 84 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
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.
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.
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.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnAdd2ShoppingList [private] |
Definition at line 74 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.BtnClose [private] |
Definition at line 24 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnConsume [private] |
Definition at line 76 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnDeleteRecipe [private] |
Definition at line 78 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnEditRecipe [private] |
Definition at line 80 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnStar1 [private] |
Definition at line 50 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnStar2 [private] |
Definition at line 52 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnStar3 [private] |
Definition at line 54 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnStar4 [private] |
Definition at line 56 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnStar5 [private] |
Definition at line 58 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeViewer.btnStore [private] |
Definition at line 82 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeViewer.bxBottom [private] |
Definition at line 42 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.VBox Foodolini.Activities.Cookbook.RecipeViewer.bxViewRecipe [private] |
Definition at line 16 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
List<FoodItem> Foodolini.Activities.Cookbook.RecipeViewer.fooditemsStorage [private] |
Definition at line 24 of file RecipeViewer.cs.
Gtk.ScrolledWindow Foodolini.Activities.Cookbook.RecipeViewer.GtkScrolledWindow [private] |
Definition at line 32 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.ScrolledWindow Foodolini.Activities.Cookbook.RecipeViewer.GtkScrolledWindow1 [private] |
Definition at line 38 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeViewer.hbox1 [private] |
Definition at line 48 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeViewer.hbox2 [private] |
Definition at line 18 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeViewer.hbox4 [private] |
Definition at line 26 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Button Foodolini.Activities.Cookbook.RecipeViewer.imgRecipe = new Button() [private] |
Definition at line 285 of file RecipeViewer.cs.
Image Foodolini.Activities.Cookbook.RecipeViewer.imgRecipeBigVersion [private] |
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.
NodeStore Foodolini.Activities.Cookbook.RecipeViewer.ingredientStorage = new NodeStore(typeof(IngredientAdapter)) [private] |
Definition at line 22 of file RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.label1 [private] |
Definition at line 60 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.label2 [private] |
Definition at line 62 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.label4 [private] |
Definition at line 64 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.label6 [private] |
Definition at line 28 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.label7 [private] |
Definition at line 36 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.lbAverageRating [private] |
Definition at line 66 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.lbDifficulty [private] |
Definition at line 68 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.lbTime [private] |
Definition at line 70 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.lbTitle [private] |
Definition at line 20 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeViewer.lbTitle1 [private] |
Definition at line 22 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.NodeView Foodolini.Activities.Cookbook.RecipeViewer.nvIngredients [private] |
Definition at line 34 of file Foodolini.Activities.Cookbook.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.
Gtk.SpinButton Foodolini.Activities.Cookbook.RecipeViewer.sbMultiplier [private] |
Definition at line 30 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Image Foodolini.Activities.Cookbook.RecipeViewer.star1 [private] |
Definition at line 26 of file RecipeViewer.cs.
Image Foodolini.Activities.Cookbook.RecipeViewer.star2 [private] |
Definition at line 27 of file RecipeViewer.cs.
Image Foodolini.Activities.Cookbook.RecipeViewer.star3 [private] |
Definition at line 28 of file RecipeViewer.cs.
Image Foodolini.Activities.Cookbook.RecipeViewer.star4 [private] |
Definition at line 29 of file RecipeViewer.cs.
Image Foodolini.Activities.Cookbook.RecipeViewer.star5 [private] |
Definition at line 30 of file RecipeViewer.cs.
Gtk.Table Foodolini.Activities.Cookbook.RecipeViewer.table1 [private] |
Definition at line 72 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.Table Foodolini.Activities.Cookbook.RecipeViewer.table3 [private] |
Definition at line 46 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.TextView Foodolini.Activities.Cookbook.RecipeViewer.tvViewRecipe [private] |
Definition at line 40 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Gtk.VBox Foodolini.Activities.Cookbook.RecipeViewer.vbox2 [private] |
Definition at line 44 of file Foodolini.Activities.Cookbook.RecipeViewer.cs.
Window Foodolini.Activities.Cookbook.RecipeViewer.w = new Window(WindowType.Toplevel) [private] |
Definition at line 363 of file RecipeViewer.cs.
Widget Foodolini.Activities.Cookbook.RecipeViewer.Widget [get] |
Implements Foodolini.Activities.IActivity.
Definition at line 467 of file RecipeViewer.cs.
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.