Foodolini.Activities.Ingredients.IngredientDialog Class Reference

A dialog window which allows the user to either view/edit the details of a specific Ingredient, delete or create a new one. More...

Collaboration diagram for Foodolini.Activities.Ingredients.IngredientDialog:
Collaboration graph

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

Foodolini.Activities.Ingredients.IngredientDialog.IngredientDialog ( Ingredient  ingredient,
bool  isNew,
string  selectedCategory 
)

Instantiates a new ingredient dialog.

Parameters:
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.

Parameters:
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.

Parameters:
ingredient A Ingredient

Definition at line 78 of file IngredientDialog.cs.

Foodolini.Activities.Ingredients.IngredientDialog.IngredientDialog (  ) 

Definition at line 82 of file IngredientDialog.cs.


Member Function Documentation

virtual void Foodolini.Activities.Ingredients.IngredientDialog.Build (  )  [protected, virtual]
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.

Parameters:
category A System.String

Definition at line 185 of file IngredientDialog.cs.

void Foodolini.Activities.Ingredients.IngredientDialog.SetIngredient ( bool  isNew  )  [private]

Initializes all widgets.

Parameters:
isNew A System.Boolean

Definition at line 92 of file IngredientDialog.cs.


Member Data Documentation

ListStore Foodolini.Activities.Ingredients.IngredientDialog.categoryStore = new ListStore (typeof(string)) [private]

The liststore containing food categories.

Definition at line 28 of file 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.

The nodestore containing nutrients.

Definition at line 23 of file IngredientDialog.cs.

The initially selected category.

Definition at line 33 of file IngredientDialog.cs.


Property Documentation

Ingredient Foodolini.Activities.Ingredients.IngredientDialog.Ingredient [get, set]

The Ingredient instance.

Definition at line 18 of file IngredientDialog.cs.


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

Foodolini 1.0.0 Documentation, generated with DoxyGen.