Inherits Foodolini::Activities::IOwner.
Public Member Functions | |
MainWindow () | |
void | AddRecipe (Recipe recipe, double servings) |
Add all ingredients needed for the recipe to the shoppinglist. | |
void | UpdateUserList () |
IActivity | PushActivity (string activity) |
Load an activity and put on top of the activity stack. | |
T | PushActivity< T > () |
Load an activity and put on top of the activity stack. | |
bool | LoadActivity (string activity) |
Unloades the activity stack and load on activity. | |
bool | PopActivity () |
Pop the top of the activity stack, and set the next activity, uses "Home" if stack is empty. | |
bool | HomeActivity () |
Tries to load the home activity. | |
void | ToggleShoppingList (bool state) |
Toggles the ShoppingList. If expanded, it will be collapsed, and if collapsed it will be expanded. | |
Protected Member Functions | |
virtual void | Build () |
virtual void | OnHomeButtonClicked (object sender, System.EventArgs e) |
virtual void | OnBtnShowHideShoppingListClicked (object sender, System.EventArgs e) |
Properties | |
Person | CurrentUser [get] |
The currently selected user, null if None or Anonymous. | |
Gtk.Window | Window [get] |
Get the main window from IOwner. | |
Events | |
EventHandler< PersonEventArgs > | CurrentUserChanged |
Occurs when the current user is changed. | |
EventHandler < ActivityUnloadedArgs > | ActivityUnloading |
Occurs when an activity is unloading. |
Definition at line 13 of file MainWindow.cs.
MainWindow.MainWindow | ( | ) |
void MainWindow.AddRecipe | ( | Recipe | recipe, | |
double | servings | |||
) |
Add all ingredients needed for the recipe to the shoppinglist.
This is all ingredients, and does not depend on what is on storage. If the nature of the shoppinglist is changed in the future, this may change.
Implements Foodolini.Activities.IOwner.
Definition at line 325 of file MainWindow.cs.
virtual void MainWindow.Build | ( | ) | [protected, virtual] |
Definition at line 53 of file MainWindow.cs.
bool MainWindow.HomeActivity | ( | ) |
Tries to load the home activity.
Implements Foodolini.Activities.IOwner.
Definition at line 415 of file MainWindow.cs.
bool MainWindow.LoadActivity | ( | string | activity | ) |
Unloades the activity stack and load on activity.
activity | Activity to load |
Implements Foodolini.Activities.IOwner.
Definition at line 379 of file MainWindow.cs.
virtual void MainWindow.OnBtnShowHideShoppingListClicked | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
virtual void MainWindow.OnHomeButtonClicked | ( | object | sender, | |
System.EventArgs | e | |||
) | [protected, virtual] |
Definition at line 31 of file MainWindow.cs.
bool MainWindow.PopActivity | ( | ) |
Pop the top of the activity stack, and set the next activity, uses "Home" if stack is empty.
Implements Foodolini.Activities.IOwner.
Definition at line 399 of file MainWindow.cs.
IActivity MainWindow.PushActivity | ( | string | activity | ) |
Load an activity and put on top of the activity stack.
activity | Activity to load |
Implements Foodolini.Activities.IOwner.
Definition at line 343 of file MainWindow.cs.
T MainWindow.PushActivity< T > | ( | ) |
Load an activity and put on top of the activity stack.
Implements Foodolini.Activities.IOwner.
T | : | class | |
T | : | new() |
void MainWindow.ToggleShoppingList | ( | bool | state | ) |
Toggles the ShoppingList. If expanded, it will be collapsed, and if collapsed it will be expanded.
Implements Foodolini.Activities.IOwner.
Definition at line 461 of file MainWindow.cs.
void MainWindow.UpdateUserList | ( | ) |
Implements Foodolini.Activities.IOwner.
Definition at line 329 of file MainWindow.cs.
Person MainWindow.CurrentUser [get] |
The currently selected user, null if None or Anonymous.
Implements Foodolini.Activities.IOwner.
Definition at line 427 of file MainWindow.cs.
Gtk.Window MainWindow.Window [get] |
Get the main window from IOwner.
Implements Foodolini.Activities.IOwner.
Definition at line 439 of file MainWindow.cs.
EventHandler<ActivityUnloadedArgs> MainWindow.ActivityUnloading |
Occurs when an activity is unloading.
Do only handle this is the Activity referenced in the arguments is the activity you are in. Be careful about changing the Unload property of the event arguments as this will cause the unload to fail.
Implements Foodolini.Activities.IOwner.
Definition at line 421 of file MainWindow.cs.
EventHandler<PersonEventArgs> MainWindow.CurrentUserChanged |
Occurs when the current user is changed.
Implements Foodolini.Activities.IOwner.
Definition at line 420 of file MainWindow.cs.