A dialog window which allows the user to either view/edit the details of a specific Ingredient, delete or create a new one. More...
Public Member Functions | |
IngredientDialog (Ingredient ingredient, bool isNew, string selectedCategory) | |
Instantiates a new ingredient dialog. | |
IngredientDialog (string selectedCategory) | |
Constructor for creating a new Ingredient object with a selected category. | |
IngredientDialog (Ingredient ingredient) | |
Instantiates an ingredient dialog with the provided ingredient. | |
IngredientDialog () | |
void | SaveIngredient () |
Saves changes to the ingredient. | |
Protected Member Functions | |
virtual void | Build () |
virtual void | OnNutrientsViewRowActivated (object o, Gtk.RowActivatedArgs args) |
Properties | |
Ingredient | Ingredient [get, set] |
The Ingredient instance. | |
Private Member Functions | |
void | SetIngredient (bool isNew) |
Initializes all widgets. | |
void | SelectActiveCategory (string category) |
Searches for the category in the combox and sets the corresponding iter. | |
Private Attributes | |
Gtk.Table | table1 |
Gtk.ComboBox | cbFoodGroup |
Gtk.HBox | hbox1 |
Gtk.SpinButton | sbShelfDays |
Gtk.Label | label12 |
Gtk.HBox | hbox2 |
Gtk.SpinButton | sbOpenDays |
Gtk.Label | label13 |
Gtk.Label | label1 |
Gtk.Label | label2 |
Gtk.Label | label3 |
Gtk.Label | label4 |
Gtk.Label | label5 |
Gtk.Label | label6 |
Gtk.Label | label7 |
Gtk.Entry | txtCommercialName |
Gtk.Entry | txtLongDescription |
Gtk.Entry | txtManufacturer |
Gtk.Entry | txtShortDescription |
Gtk.Label | label8 |
Gtk.ScrolledWindow | GtkScrolledWindow |
Gtk.NodeView | nutrientsView |
Gtk.Button | btnDelete |
Gtk.Button | buttonCancel |
Gtk.Button | buttonOk |
NodeStore | nutrientsStore = new NodeStore (typeof(NutrientAdapter)) |
The nodestore containing nutrients. | |
ListStore | categoryStore = new ListStore (typeof(string)) |
The liststore containing food categories. | |
string | selectedCategory = string.Empty |
The initially selected category. | |
Static Private Attributes | |
static string | defaultName = "New ingredient" |
The default name of the new Ingredient. |
A dialog window which allows the user to either view/edit the details of a specific Ingredient, delete or create a new one.
Definition at line 14 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Foodolini.Activities.Ingredients.IngredientDialog.IngredientDialog | ( | Ingredient | ingredient, | |
bool | isNew, | |||
string | selectedCategory | |||
) |
Instantiates a new ingredient dialog.
ingredient | A Ingredient to bind to the dialog. | |
isNew | A System.Boolean whether the Ingredient provided is new. | |
selectedCategory | A System.String containing the category to select in the category combobox. |
Definition at line 53 of file IngredientDialog.cs.
Foodolini.Activities.Ingredients.IngredientDialog.IngredientDialog | ( | string | selectedCategory | ) |
Constructor for creating a new Ingredient object with a selected category.
selectedCategory | A System.String containing the category to select in the category combobox. |
Definition at line 68 of file IngredientDialog.cs.
Foodolini.Activities.Ingredients.IngredientDialog.IngredientDialog | ( | Ingredient | ingredient | ) |
Instantiates an ingredient dialog with the provided ingredient.
ingredient | A Ingredient |
Definition at line 78 of file IngredientDialog.cs.
Foodolini.Activities.Ingredients.IngredientDialog.IngredientDialog | ( | ) |
Definition at line 82 of file IngredientDialog.cs.
virtual void Foodolini.Activities.Ingredients.IngredientDialog.Build | ( | ) | [protected, virtual] |
Definition at line 66 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
virtual void Foodolini.Activities.Ingredients.IngredientDialog.OnNutrientsViewRowActivated | ( | object | o, | |
Gtk.RowActivatedArgs | args | |||
) | [protected, virtual] |
Definition at line 239 of file IngredientDialog.cs.
void Foodolini.Activities.Ingredients.IngredientDialog.SaveIngredient | ( | ) |
Saves changes to the ingredient.
Definition at line 204 of file IngredientDialog.cs.
void Foodolini.Activities.Ingredients.IngredientDialog.SelectActiveCategory | ( | string | category | ) | [private] |
Searches for the category in the combox and sets the corresponding iter.
category | A System.String |
Definition at line 185 of file IngredientDialog.cs.
void Foodolini.Activities.Ingredients.IngredientDialog.SetIngredient | ( | bool | isNew | ) | [private] |
Initializes all widgets.
isNew | A System.Boolean |
Definition at line 92 of file IngredientDialog.cs.
Gtk.Button Foodolini.Activities.Ingredients.IngredientDialog.btnDelete [private] |
Definition at line 60 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Button Foodolini.Activities.Ingredients.IngredientDialog.buttonCancel [private] |
Definition at line 62 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Button Foodolini.Activities.Ingredients.IngredientDialog.buttonOk [private] |
Definition at line 64 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
ListStore Foodolini.Activities.Ingredients.IngredientDialog.categoryStore = new ListStore (typeof(string)) [private] |
The liststore containing food categories.
Definition at line 28 of file IngredientDialog.cs.
Gtk.ComboBox Foodolini.Activities.Ingredients.IngredientDialog.cbFoodGroup [private] |
Definition at line 18 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
string Foodolini.Activities.Ingredients.IngredientDialog.defaultName = "New ingredient" [static, private] |
The default name of the new Ingredient.
Definition at line 37 of file IngredientDialog.cs.
Gtk.ScrolledWindow Foodolini.Activities.Ingredients.IngredientDialog.GtkScrolledWindow [private] |
Definition at line 56 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.HBox Foodolini.Activities.Ingredients.IngredientDialog.hbox1 [private] |
Definition at line 20 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.HBox Foodolini.Activities.Ingredients.IngredientDialog.hbox2 [private] |
Definition at line 26 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label1 [private] |
Definition at line 32 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label12 [private] |
Definition at line 24 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label13 [private] |
Definition at line 30 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label2 [private] |
Definition at line 34 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label3 [private] |
Definition at line 36 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label4 [private] |
Definition at line 38 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label5 [private] |
Definition at line 40 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label6 [private] |
Definition at line 42 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label7 [private] |
Definition at line 44 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Label Foodolini.Activities.Ingredients.IngredientDialog.label8 [private] |
Definition at line 54 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
NodeStore Foodolini.Activities.Ingredients.IngredientDialog.nutrientsStore = new NodeStore (typeof(NutrientAdapter)) [private] |
The nodestore containing nutrients.
Definition at line 23 of file IngredientDialog.cs.
Gtk.NodeView Foodolini.Activities.Ingredients.IngredientDialog.nutrientsView [private] |
Definition at line 58 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.SpinButton Foodolini.Activities.Ingredients.IngredientDialog.sbOpenDays [private] |
Definition at line 28 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.SpinButton Foodolini.Activities.Ingredients.IngredientDialog.sbShelfDays [private] |
Definition at line 22 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
string Foodolini.Activities.Ingredients.IngredientDialog.selectedCategory = string.Empty [private] |
The initially selected category.
Definition at line 33 of file IngredientDialog.cs.
Gtk.Table Foodolini.Activities.Ingredients.IngredientDialog.table1 [private] |
Definition at line 16 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Entry Foodolini.Activities.Ingredients.IngredientDialog.txtCommercialName [private] |
Definition at line 46 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Entry Foodolini.Activities.Ingredients.IngredientDialog.txtLongDescription [private] |
Definition at line 48 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Entry Foodolini.Activities.Ingredients.IngredientDialog.txtManufacturer [private] |
Definition at line 50 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Gtk.Entry Foodolini.Activities.Ingredients.IngredientDialog.txtShortDescription [private] |
Definition at line 52 of file Foodolini.Activities.Ingredients.IngredientDialog.cs.
Ingredient Foodolini.Activities.Ingredients.IngredientDialog.Ingredient [get, set] |
The Ingredient instance.
Definition at line 18 of file IngredientDialog.cs.