The Main Inventoy Activity display the FoodItem in the storage to the user and allow the user to consume, edit or delete a selected FoodItem. More...
Inherits Foodolini::Activities::IActivity.
Public Member Functions | |
InventoryActivity () | |
creates a new Inventory Activity | |
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 | OnRegisterBtnClicked (object sender, System.EventArgs e) |
push a FoodRegistartion activity. Were the user can registere new fooditem and then return to the inventory. | |
virtual void | OnDeletebntClicked (object sender, System.EventArgs e) |
opens delete dialog. | |
virtual void | OnEditbntClicked (object sender, System.EventArgs e) |
open edit dialog | |
virtual void | OnConsumeBntClicked (object sender, System.EventArgs e) |
creates a consume fooditem dialog were the user can select an amount to consume. | |
virtual void | OnFoodItemViewCursorChanged (object sender, System.EventArgs e) |
virtual void | OnFoodItemViewRowActivated (object o, Gtk.RowActivatedArgs args) |
Properties | |
Widget | Widget [get] |
Private Member Functions | |
void | HandleShown (object sender, EventArgs e) |
creates the treeview and updates the displayed data. | |
void | OpenEditDialog () |
creates a EditDialog for the selected FoodItem were the user can edit the FoodItem. | |
void | OpenDeleteDialog () |
creates a delete FoodItem dialog for the selected FoodItem were the user can delete the FoodItem. | |
void | UpdateGrey () |
updates the sensitivity of the buttons on the screen. so that the user cant use them if the system can not perform the action at the given time. | |
void | UpdateFoodItem () |
Private Attributes | |
Gtk.HBox | hbox2 |
Gtk.VBox | vbox1 |
Gtk.ScrolledWindow | GtkScrolledWindow |
Gtk.NodeView | foodItemView |
Gtk.HBox | hbox1 |
Gtk.HButtonBox | hbuttonbox1 |
Gtk.Button | RegisterBtn |
Gtk.HBox | hbox3 |
Gtk.VSeparator | vseparator2 |
Gtk.VBox | vbox2 |
Gtk.Label | label5 |
Gtk.Label | lbIngre |
Gtk.Label | lbAmount |
Gtk.Label | lbExpire |
Gtk.Label | lbshelf |
Gtk.HBox | hbox4 |
Gtk.Button | ConsumeBnt |
Gtk.Button | Editbnt |
Gtk.Button | Deletebnt |
Gtk.HBox | hbox6 |
Gtk.Label | label6 |
Gtk.HBox | hbox7 |
Gtk.Label | label8 |
Gtk.HBox | hbox5 |
Gtk.Label | label7 |
NodeStore | storage = new NodeStore (typeof(FoodItemAdapter)) |
IOwner | owner |
The Main Inventoy Activity display the FoodItem in the storage to the user and allow the user to consume, edit or delete a selected FoodItem.
Definition at line 14 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Foodolini.Activities.Inventory.InventoryActivity.InventoryActivity | ( | ) |
creates a new Inventory Activity
Definition at line 23 of file InventoryActivity.cs.
virtual void Foodolini.Activities.Inventory.InventoryActivity.Build | ( | ) | [protected, virtual] |
Definition at line 66 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
void Foodolini.Activities.Inventory.InventoryActivity.HandleShown | ( | object | sender, | |
EventArgs | e | |||
) | [private] |
creates the treeview and updates the displayed data.
sender | A System.Object | |
e | A EventArgs |
Definition at line 58 of file InventoryActivity.cs.
virtual void Foodolini.Activities.Inventory.InventoryActivity.OnConsumeBntClicked | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
creates a consume fooditem dialog were the user can select an amount to consume.
sender | A System.Object | |
e | A System.EventArgs |
Definition at line 180 of file InventoryActivity.cs.
virtual void Foodolini.Activities.Inventory.InventoryActivity.OnDeletebntClicked | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
opens delete dialog.
sender | A System.Object | |
e | A System.EventArgs |
Definition at line 95 of file InventoryActivity.cs.
virtual void Foodolini.Activities.Inventory.InventoryActivity.OnEditbntClicked | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
open edit dialog
sender | A System.Object | |
e | A System.EventArgs |
Definition at line 130 of file InventoryActivity.cs.
virtual void Foodolini.Activities.Inventory.InventoryActivity.OnFoodItemViewCursorChanged | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Definition at line 209 of file InventoryActivity.cs.
virtual void Foodolini.Activities.Inventory.InventoryActivity.OnFoodItemViewRowActivated | ( | object | o, | |
Gtk.RowActivatedArgs | args | |||
) | [protected, virtual] |
Definition at line 235 of file InventoryActivity.cs.
virtual void Foodolini.Activities.Inventory.InventoryActivity.OnRegisterBtnClicked | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
push a FoodRegistartion activity. Were the user can registere new fooditem and then return to the inventory.
sender | A System.Object | |
e | A System.EventArgs |
Definition at line 81 of file InventoryActivity.cs.
void Foodolini.Activities.Inventory.InventoryActivity.OpenDeleteDialog | ( | ) | [private] |
creates a delete FoodItem dialog for the selected FoodItem were the user can delete the FoodItem.
Definition at line 138 of file InventoryActivity.cs.
void Foodolini.Activities.Inventory.InventoryActivity.OpenEditDialog | ( | ) | [private] |
creates a EditDialog for the selected FoodItem were the user can edit the FoodItem.
Definition at line 103 of file InventoryActivity.cs.
void Foodolini.Activities.Inventory.InventoryActivity.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 45 of file InventoryActivity.cs.
void Foodolini.Activities.Inventory.InventoryActivity.Unregister | ( | ) |
Unsubscribe to the events exposed by owner, and loose any references to owner.
Implements Foodolini.Activities.IActivity.
Definition at line 68 of file InventoryActivity.cs.
void Foodolini.Activities.Inventory.InventoryActivity.UpdateFoodItem | ( | ) | [private] |
Definition at line 214 of file InventoryActivity.cs.
void Foodolini.Activities.Inventory.InventoryActivity.UpdateGrey | ( | ) | [private] |
updates the sensitivity of the buttons on the screen. so that the user cant use them if the system can not perform the action at the given time.
Definition at line 157 of file InventoryActivity.cs.
Gtk.Button Foodolini.Activities.Inventory.InventoryActivity.ConsumeBnt [private] |
Definition at line 48 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Button Foodolini.Activities.Inventory.InventoryActivity.Deletebnt [private] |
Definition at line 52 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Button Foodolini.Activities.Inventory.InventoryActivity.Editbnt [private] |
Definition at line 50 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.NodeView Foodolini.Activities.Inventory.InventoryActivity.foodItemView [private] |
Definition at line 22 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.ScrolledWindow Foodolini.Activities.Inventory.InventoryActivity.GtkScrolledWindow [private] |
Definition at line 20 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.HBox Foodolini.Activities.Inventory.InventoryActivity.hbox1 [private] |
Definition at line 24 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.HBox Foodolini.Activities.Inventory.InventoryActivity.hbox2 [private] |
Definition at line 16 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.HBox Foodolini.Activities.Inventory.InventoryActivity.hbox3 [private] |
Definition at line 30 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.HBox Foodolini.Activities.Inventory.InventoryActivity.hbox4 [private] |
Definition at line 46 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.HBox Foodolini.Activities.Inventory.InventoryActivity.hbox5 [private] |
Definition at line 62 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.HBox Foodolini.Activities.Inventory.InventoryActivity.hbox6 [private] |
Definition at line 54 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.HBox Foodolini.Activities.Inventory.InventoryActivity.hbox7 [private] |
Definition at line 58 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.HButtonBox Foodolini.Activities.Inventory.InventoryActivity.hbuttonbox1 [private] |
Definition at line 26 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Label Foodolini.Activities.Inventory.InventoryActivity.label5 [private] |
Definition at line 36 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Label Foodolini.Activities.Inventory.InventoryActivity.label6 [private] |
Definition at line 56 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Label Foodolini.Activities.Inventory.InventoryActivity.label7 [private] |
Definition at line 64 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Label Foodolini.Activities.Inventory.InventoryActivity.label8 [private] |
Definition at line 60 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Label Foodolini.Activities.Inventory.InventoryActivity.lbAmount [private] |
Definition at line 40 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Label Foodolini.Activities.Inventory.InventoryActivity.lbExpire [private] |
Definition at line 42 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Label Foodolini.Activities.Inventory.InventoryActivity.lbIngre [private] |
Definition at line 38 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.Label Foodolini.Activities.Inventory.InventoryActivity.lbshelf [private] |
Definition at line 44 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Definition at line 44 of file InventoryActivity.cs.
Gtk.Button Foodolini.Activities.Inventory.InventoryActivity.RegisterBtn [private] |
Definition at line 28 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
NodeStore Foodolini.Activities.Inventory.InventoryActivity.storage = new NodeStore (typeof(FoodItemAdapter)) [private] |
Definition at line 18 of file InventoryActivity.cs.
Gtk.VBox Foodolini.Activities.Inventory.InventoryActivity.vbox1 [private] |
Definition at line 18 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.VBox Foodolini.Activities.Inventory.InventoryActivity.vbox2 [private] |
Definition at line 34 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Gtk.VSeparator Foodolini.Activities.Inventory.InventoryActivity.vseparator2 [private] |
Definition at line 32 of file Foodolini.Activities.Inventory.InventoryActivity.cs.
Widget Foodolini.Activities.Inventory.InventoryActivity.Widget [get] |
Implements Foodolini.Activities.IActivity.
Definition at line 242 of file InventoryActivity.cs.