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 |
An activity where a new recipe can be created.
Definition at line 14 of file Foodolini.Activities.RecipeCreater.cs.
Foodolini.Activities.RecipeCreater.RecipeCreater | ( | ) |
Constructor that sets up the nodeview and sets the sensitivity on the save button to false.
Definition at line 29 of file RecipeCreater.cs.
virtual void Foodolini.Activities.RecipeCreater.Build | ( | ) | [protected, virtual] |
Definition at line 104 of file Foodolini.Activities.RecipeCreater.cs.
virtual void Foodolini.Activities.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 92 of file RecipeCreater.cs.
virtual void Foodolini.Activities.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 111 of file RecipeCreater.cs.
virtual void Foodolini.Activities.RecipeCreater.OnCancelClick | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Pops the activity when Cancel is clicked.
Definition at line 127 of file RecipeCreater.cs.
virtual void Foodolini.Activities.RecipeCreater.OnEntryChanged | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Event called when an entry has been changed. Calls CheckIfFilled().
Definition at line 135 of file RecipeCreater.cs.
virtual void Foodolini.Activities.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 152 of file RecipeCreater.cs.
virtual void Foodolini.Activities.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.RecipeCreater.OnTvDirectionsKeyReleaseEvent | ( | object | o, | |
Gtk.KeyReleaseEventArgs | args | |||
) | [protected, virtual] |
Event called when directions have changed. Calls CheckIfFilled().
Definition at line 143 of file RecipeCreater.cs.
void Foodolini.Activities.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.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.
Recipe Foodolini.Activities.RecipeCreater.Recipe [get] |
Getter for the current recipe.
Definition at line 228 of file RecipeCreater.cs.
Widget Foodolini.Activities.RecipeCreater.Widget [get] |
Implements Foodolini.Activities.IActivity.
Definition at line 241 of file RecipeCreater.cs.
EventHandler<RecipeEventArgs> Foodolini.Activities.RecipeCreater.OnRecipeCreated |
Definition at line 71 of file RecipeCreater.cs.