Foodolini.Activities.Inventory.InventoryActivity Class Reference

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.

Collaboration diagram for Foodolini.Activities.Inventory.InventoryActivity:
Collaboration graph

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

Foodolini.Activities.Inventory.InventoryActivity.InventoryActivity (  ) 

creates a new Inventory Activity

Definition at line 23 of file InventoryActivity.cs.


Member Function Documentation

virtual void Foodolini.Activities.Inventory.InventoryActivity.Build (  )  [protected, virtual]
void Foodolini.Activities.Inventory.InventoryActivity.HandleShown ( object  sender,
EventArgs  e 
) [private]

creates the treeview and updates the displayed data.

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

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

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

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

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

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


Member Data Documentation

Definition at line 44 of file InventoryActivity.cs.

NodeStore Foodolini.Activities.Inventory.InventoryActivity.storage = new NodeStore (typeof(FoodItemAdapter)) [private]

Definition at line 18 of file InventoryActivity.cs.


Property Documentation

Widget Foodolini.Activities.Inventory.InventoryActivity.Widget [get]

Implements Foodolini.Activities.IActivity.

Definition at line 242 of file InventoryActivity.cs.


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

Foodolini 1.0.0 Documentation, generated with DoxyGen.