An activity where a new recipe can be created. More...
Inherits Foodolini::Activities::IActivity.
Public Member Functions | |
RecipeCreater () | |
Constructor that sets up the nodeview and sets the sensitivity on the save button to false. | |
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 | OnAddIngredient (object sender, System.EventArgs e) |
Opens a dialog where a new ingredient and the amount can be selected and added to the Recipe opon saving. | |
virtual void | OnBtnRemoveIngredientClicked (object sender, System.EventArgs e) |
Removes the selected ingredient form the list. If no ingredients are left, the variable ingredientsAdded is set to false. CheckIfFilled() is called at the end. | |
virtual void | OnCancelClick (object sender, System.EventArgs e) |
Pops the activity when Cancel is clicked. | |
virtual void | OnEntryChanged (object sender, System.EventArgs e) |
Event called when an entry has been changed. Calls CheckIfFilled(). | |
virtual void | OnTvDirectionsKeyReleaseEvent (object o, Gtk.KeyReleaseEventArgs args) |
Event called when directions have changed. Calls CheckIfFilled(). | |
virtual void | OnSaveClicked (object sender, System.EventArgs e) |
Saves the Recipe in the database Button is only active when the title, the categories, the directions and Ingrediens have been set. | |
virtual void | OnSelectPictureClick (object sender, System.EventArgs e) |
Previews the Recipe image when selected in the filechooserwidget. | |
Properties | |
Recipe | Recipe [get] |
Widget | Widget [get] |
Events | |
EventHandler< RecipeEventArgs > | OnRecipeCreated |
Private Member Functions | |
void | CheckIfFilled () |
Checks if a Title, at least one categori and ingredient has been given. | |
Private Attributes | |
Gtk.VBox | vbox2 |
Gtk.Label | lbWidgetTitle |
Gtk.HBox | hbox2 |
Gtk.VBox | vbox3 |
Gtk.Label | label3 |
Gtk.Entry | entTitle |
Gtk.Label | label4 |
Gtk.Entry | entCategories |
Gtk.Label | label5 |
Gtk.ScrolledWindow | GtkScrolledWindow2 |
Gtk.TextView | tvDirections |
Gtk.VBox | bxIngredient |
Gtk.Table | table4 |
Gtk.ComboBox | cbxDifficulty |
Gtk.ComboBox | cbxMealtype |
Gtk.HBox | hbox1 |
Gtk.SpinButton | sbMultiplier |
Gtk.Label | label13 |
Gtk.HBox | hbox7 |
Gtk.SpinButton | sbDays |
Gtk.Label | label12 |
Gtk.SpinButton | sbHours |
Gtk.Label | label11 |
Gtk.SpinButton | sbMinuts |
Gtk.Label | label10 |
Gtk.Label | label1 |
Gtk.Label | label2 |
Gtk.Label | label8 |
Gtk.Label | label9 |
Gtk.ScrolledWindow | GtkScrolledWindow |
Gtk.NodeView | nvIngredients |
Gtk.HBox | hbox3 |
Gtk.Button | btnAddIngredient |
Gtk.Button | btnRemoveIngredient |
Gtk.HSeparator | hseparator2 |
Gtk.HBox | hbox5 |
Gtk.Label | label6 |
Gtk.FileChooserButton | fcbPicture |
Gtk.Image | imgRecipe |
Gtk.HSeparator | hseparator1 |
Gtk.HBox | hbox4 |
Gtk.Label | label7 |
Gtk.Button | btnCancel |
Gtk.Button | btnSave |
IOwner | owner |
Recipe | recipe |
NodeStore | ingredientStorage = new NodeStore(typeof(IngredientAdapter)) |
IList< string > | listCategory = new List<string>() |
List< string > | listDirections = new List<string>() |
bool | ingredientsAdded = false |
byte[] | byteArray |
An activity where a new recipe can be created.
Definition at line 14 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Foodolini.Activities.Cookbook.RecipeCreater.RecipeCreater | ( | ) |
Constructor that sets up the nodeview and sets the sensitivity on the save button to false.
Definition at line 30 of file RecipeCreater.cs.
virtual void Foodolini.Activities.Cookbook.RecipeCreater.Build | ( | ) | [protected, virtual] |
Definition at line 104 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
void Foodolini.Activities.Cookbook.RecipeCreater.CheckIfFilled | ( | ) | [private] |
Checks if a Title, at least one categori and ingredient has been given.
Definition at line 77 of file RecipeCreater.cs.
virtual void Foodolini.Activities.Cookbook.RecipeCreater.OnAddIngredient | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Opens a dialog where a new ingredient and the amount can be selected and added to the Recipe opon saving.
Definition at line 93 of file RecipeCreater.cs.
virtual void Foodolini.Activities.Cookbook.RecipeCreater.OnBtnRemoveIngredientClicked | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Removes the selected ingredient form the list. If no ingredients are left, the variable ingredientsAdded is set to false. CheckIfFilled() is called at the end.
Definition at line 112 of file RecipeCreater.cs.
virtual void Foodolini.Activities.Cookbook.RecipeCreater.OnCancelClick | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Pops the activity when Cancel is clicked.
Definition at line 128 of file RecipeCreater.cs.
virtual void Foodolini.Activities.Cookbook.RecipeCreater.OnEntryChanged | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Event called when an entry has been changed. Calls CheckIfFilled().
Definition at line 136 of file RecipeCreater.cs.
virtual void Foodolini.Activities.Cookbook.RecipeCreater.OnSaveClicked | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Saves the Recipe in the database Button is only active when the title, the categories, the directions and Ingrediens have been set.
Definition at line 153 of file RecipeCreater.cs.
virtual void Foodolini.Activities.Cookbook.RecipeCreater.OnSelectPictureClick | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Previews the Recipe image when selected in the filechooserwidget.
Definition at line 213 of file RecipeCreater.cs.
virtual void Foodolini.Activities.Cookbook.RecipeCreater.OnTvDirectionsKeyReleaseEvent | ( | object | o, | |
Gtk.KeyReleaseEventArgs | args | |||
) | [protected, virtual] |
Event called when directions have changed. Calls CheckIfFilled().
Definition at line 144 of file RecipeCreater.cs.
void Foodolini.Activities.Cookbook.RecipeCreater.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 233 of file RecipeCreater.cs.
void Foodolini.Activities.Cookbook.RecipeCreater.Unregister | ( | ) |
Unsubscribe to the events exposed by owner, and loose any references to owner.
Implements Foodolini.Activities.IActivity.
Definition at line 237 of file RecipeCreater.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeCreater.btnAddIngredient [private] |
Definition at line 80 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeCreater.btnCancel [private] |
Definition at line 100 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeCreater.btnRemoveIngredient [private] |
Definition at line 82 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Button Foodolini.Activities.Cookbook.RecipeCreater.btnSave [private] |
Definition at line 102 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.VBox Foodolini.Activities.Cookbook.RecipeCreater.bxIngredient [private] |
Definition at line 38 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
byte [] Foodolini.Activities.Cookbook.RecipeCreater.byteArray [private] |
Definition at line 209 of file RecipeCreater.cs.
Gtk.ComboBox Foodolini.Activities.Cookbook.RecipeCreater.cbxDifficulty [private] |
Definition at line 42 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.ComboBox Foodolini.Activities.Cookbook.RecipeCreater.cbxMealtype [private] |
Definition at line 44 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Entry Foodolini.Activities.Cookbook.RecipeCreater.entCategories [private] |
Definition at line 30 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Entry Foodolini.Activities.Cookbook.RecipeCreater.entTitle [private] |
Definition at line 26 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.FileChooserButton Foodolini.Activities.Cookbook.RecipeCreater.fcbPicture [private] |
Definition at line 90 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.ScrolledWindow Foodolini.Activities.Cookbook.RecipeCreater.GtkScrolledWindow [private] |
Definition at line 74 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.ScrolledWindow Foodolini.Activities.Cookbook.RecipeCreater.GtkScrolledWindow2 [private] |
Definition at line 34 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeCreater.hbox1 [private] |
Definition at line 46 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeCreater.hbox2 [private] |
Definition at line 20 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeCreater.hbox3 [private] |
Definition at line 78 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeCreater.hbox4 [private] |
Definition at line 96 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeCreater.hbox5 [private] |
Definition at line 86 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.HBox Foodolini.Activities.Cookbook.RecipeCreater.hbox7 [private] |
Definition at line 52 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.HSeparator Foodolini.Activities.Cookbook.RecipeCreater.hseparator1 [private] |
Definition at line 94 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.HSeparator Foodolini.Activities.Cookbook.RecipeCreater.hseparator2 [private] |
Definition at line 84 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Image Foodolini.Activities.Cookbook.RecipeCreater.imgRecipe [private] |
Definition at line 92 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
bool Foodolini.Activities.Cookbook.RecipeCreater.ingredientsAdded = false [private] |
Definition at line 25 of file RecipeCreater.cs.
NodeStore Foodolini.Activities.Cookbook.RecipeCreater.ingredientStorage = new NodeStore(typeof(IngredientAdapter)) [private] |
Definition at line 22 of file RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label1 [private] |
Definition at line 66 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label10 [private] |
Definition at line 64 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label11 [private] |
Definition at line 60 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label12 [private] |
Definition at line 56 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label13 [private] |
Definition at line 50 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label2 [private] |
Definition at line 68 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label3 [private] |
Definition at line 24 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label4 [private] |
Definition at line 28 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label5 [private] |
Definition at line 32 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label6 [private] |
Definition at line 88 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label7 [private] |
Definition at line 98 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label8 [private] |
Definition at line 70 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.label9 [private] |
Definition at line 72 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Label Foodolini.Activities.Cookbook.RecipeCreater.lbWidgetTitle [private] |
Definition at line 18 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
IList<string> Foodolini.Activities.Cookbook.RecipeCreater.listCategory = new List<string>() [private] |
Definition at line 23 of file RecipeCreater.cs.
List<string> Foodolini.Activities.Cookbook.RecipeCreater.listDirections = new List<string>() [private] |
Definition at line 24 of file RecipeCreater.cs.
Gtk.NodeView Foodolini.Activities.Cookbook.RecipeCreater.nvIngredients [private] |
Definition at line 76 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Definition at line 20 of file RecipeCreater.cs.
Definition at line 21 of file RecipeCreater.cs.
Gtk.SpinButton Foodolini.Activities.Cookbook.RecipeCreater.sbDays [private] |
Definition at line 54 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.SpinButton Foodolini.Activities.Cookbook.RecipeCreater.sbHours [private] |
Definition at line 58 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.SpinButton Foodolini.Activities.Cookbook.RecipeCreater.sbMinuts [private] |
Definition at line 62 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.SpinButton Foodolini.Activities.Cookbook.RecipeCreater.sbMultiplier [private] |
Definition at line 48 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.Table Foodolini.Activities.Cookbook.RecipeCreater.table4 [private] |
Definition at line 40 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.TextView Foodolini.Activities.Cookbook.RecipeCreater.tvDirections [private] |
Definition at line 36 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.VBox Foodolini.Activities.Cookbook.RecipeCreater.vbox2 [private] |
Definition at line 16 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Gtk.VBox Foodolini.Activities.Cookbook.RecipeCreater.vbox3 [private] |
Definition at line 22 of file Foodolini.Activities.Cookbook.RecipeCreater.cs.
Recipe Foodolini.Activities.Cookbook.RecipeCreater.Recipe [get] |
Getter for the current recipe.
Definition at line 228 of file RecipeCreater.cs.
Widget Foodolini.Activities.Cookbook.RecipeCreater.Widget [get] |
Implements Foodolini.Activities.IActivity.
Definition at line 241 of file RecipeCreater.cs.
EventHandler<RecipeEventArgs> Foodolini.Activities.Cookbook.RecipeCreater.OnRecipeCreated |
Definition at line 72 of file RecipeCreater.cs.