|
Vereinsmeisterschaften
22aa7800eae54b428d40e835886cefe1fdefdfdf
This is a software that can be used to manage the internal competition of the swimming club Illertissen called "Vereinsmeisterschaften".
|
ViewModel for the main shell of the application. More...
Public Member Functions | |
| ShellViewModel (INavigationService navigationService, IDialogCoordinator dialogCoordinator, IWorkspaceService workspaceService) | |
| Constructor of the view model of the main shell of the application. | |
| async Task<(bool saveOut, bool cancelOut)> | CheckForUnsavedChangesAndQueryUserAction () |
| Show a dialog to the user when there are unsaved changes. | |
Protected Member Functions | |
| void | OnClosing (CancelEventArgs e) |
Properties | |
| string | CurrentWorkspaceFolder [get] |
| Path to the current workspace folder. | |
| bool | HasUnsavedChanges [get] |
| True if the workspace has unsaved changes; otherwise false. | |
| ObservableCollection< HamburgerMenuItem > | MenuItems [get] |
| Available menu items in the hamburger menu. | |
| ObservableCollection< HamburgerMenuItem > | OptionMenuItems [get] |
| Available menu items in the hamburger menu options section. | |
| RelayCommand | GoBackCommand [get] |
| Command to navigate back in the navigation stack. | |
| ICommand | MenuItemInvokedCommand [get] |
| Command that is invoked when a menu item in the hamburger menu is clicked. | |
| ICommand | OptionsMenuItemInvokedCommand [get] |
| Command that is invoked when an options menu item in the hamburger menu is clicked. | |
| ICommand | LoadedCommand [get] |
| Command that is invoked when the shell is loaded. | |
| ICommand | UnloadedCommand [get] |
| Command that is invoked when the shell is unloaded. | |
| ICommand | ClosingCommand [get] |
| Command that is invoked when the shell is closing. | |
| ICommand | SaveWorkspaceCommand [get] |
| Command to save the current workspace. | |
| ICommand | OpenWorkspaceFlyoutCommand [get] |
| Command to open the workspace flyout. | |
Events | |
| EventHandler | WindowCloseRequested |
| Event that is raised when the window close is requested. | |
Private Member Functions | |
| async void | OnLoaded () |
| void | OnUnloaded () |
| void | _workspaceService_PropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e) |
| void | updateMenuItemsEnabledState () |
| Update the enabled state of the menu items based on whether a workspace is open. | |
| void | NavigateTo (Type targetViewModel) |
| void | OnNavigated (object sender, string viewModelName) |
Private Attributes | |
| bool | _isWorkspaceFlyoutOpen |
| True if the workspace flyout is open (used to open, save, ... the workspace) | |
| readonly INavigationService | _navigationService |
| IDialogCoordinator | _dialogCoordinator |
| IWorkspaceService | _workspaceService |
| HamburgerMenuItem | _selectedMenuItem |
| Menu item that is currently selected in the hamburger menu. | |
| HamburgerMenuItem | _selectedOptionsMenuItem |
| Menu item that is currently selected in the hamburger menu options section. | |
| RelayCommand | _goBackCommand |
| ICommand | _menuItemInvokedCommand |
| ICommand | _optionsMenuItemInvokedCommand |
| ICommand | _loadedCommand |
| ICommand | _unloadedCommand |
| ICommand | _closingCommand |
| ICommand | _saveWorkspaceCommand |
| ICommand | _openWorkspaceFlyoutCommand |
| bool | _forceClose = false |
Static Private Attributes | |
| const string | SETTING_KEY_LAST_WORKSPACE_PATHS = "LastWorkspacePaths" |
| const string | SETTING_KEY_LAST_WORKSPACE_FOLDER = "LastWorkspaceFolder" |
ViewModel for the main shell of the application.
Definition at line 18 of file ShellViewModel.cs.
| Vereinsmeisterschaften.ViewModels.ShellViewModel.ShellViewModel | ( | INavigationService | navigationService, |
| IDialogCoordinator | dialogCoordinator, | ||
| IWorkspaceService | workspaceService ) |
Constructor of the view model of the main shell of the application.
| navigationService | INavigationService object |
| dialogCoordinator | IDialogCoordinator object |
| workspaceService | IWorkspaceService object |
Definition at line 156 of file ShellViewModel.cs.
|
private |
Definition at line 198 of file ShellViewModel.cs.
| async Task<(bool saveOut, bool cancelOut)> Vereinsmeisterschaften.ViewModels.ShellViewModel.CheckForUnsavedChangesAndQueryUserAction | ( | ) |
Show a dialog to the user when there are unsaved changes.
The user can choose to save, not save or cancel.
Definition at line 282 of file ShellViewModel.cs.
|
private |
Definition at line 311 of file ShellViewModel.cs.
|
protected |
Definition at line 240 of file ShellViewModel.cs.
|
private |
Definition at line 167 of file ShellViewModel.cs.
|
private |
Definition at line 319 of file ShellViewModel.cs.
|
private |
Definition at line 192 of file ShellViewModel.cs.
|
private |
Update the enabled state of the menu items based on whether a workspace is open.
Definition at line 217 of file ShellViewModel.cs.
|
private |
Definition at line 102 of file ShellViewModel.cs.
|
private |
Definition at line 39 of file ShellViewModel.cs.
|
private |
Definition at line 234 of file ShellViewModel.cs.
|
private |
Definition at line 97 of file ShellViewModel.cs.
|
private |
True if the workspace flyout is open (used to open, save, ... the workspace)
Definition at line 34 of file ShellViewModel.cs.
|
private |
Definition at line 100 of file ShellViewModel.cs.
|
private |
Definition at line 98 of file ShellViewModel.cs.
|
private |
Definition at line 38 of file ShellViewModel.cs.
|
private |
Definition at line 104 of file ShellViewModel.cs.
|
private |
Definition at line 99 of file ShellViewModel.cs.
|
private |
Definition at line 103 of file ShellViewModel.cs.
|
private |
Menu item that is currently selected in the hamburger menu.
Definition at line 59 of file ShellViewModel.cs.
|
private |
Menu item that is currently selected in the hamburger menu options section.
Definition at line 65 of file ShellViewModel.cs.
|
private |
Definition at line 101 of file ShellViewModel.cs.
|
private |
Definition at line 40 of file ShellViewModel.cs.
|
staticprivate |
Definition at line 47 of file ShellViewModel.cs.
|
staticprivate |
Definition at line 46 of file ShellViewModel.cs.
|
get |
Command that is invoked when the shell is closing.
Definition at line 134 of file ShellViewModel.cs.
|
get |
Path to the current workspace folder.
Definition at line 23 of file ShellViewModel.cs.
|
get |
Command to navigate back in the navigation stack.
Definition at line 109 of file ShellViewModel.cs.
|
get |
True if the workspace has unsaved changes; otherwise false.
Definition at line 28 of file ShellViewModel.cs.
|
get |
Command that is invoked when the shell is loaded.
Definition at line 124 of file ShellViewModel.cs.
|
get |
Command that is invoked when a menu item in the hamburger menu is clicked.
Definition at line 114 of file ShellViewModel.cs.
|
get |
Available menu items in the hamburger menu.
Definition at line 70 of file ShellViewModel.cs.
|
get |
Command to open the workspace flyout.
Definition at line 144 of file ShellViewModel.cs.
|
get |
Available menu items in the hamburger menu options section.
Definition at line 86 of file ShellViewModel.cs.
|
get |
Command that is invoked when an options menu item in the hamburger menu is clicked.
Definition at line 119 of file ShellViewModel.cs.
|
get |
Command to save the current workspace.
Definition at line 139 of file ShellViewModel.cs.
|
get |
Command that is invoked when the shell is unloaded.
Definition at line 129 of file ShellViewModel.cs.
| EventHandler Vereinsmeisterschaften.ViewModels.ShellViewModel.WindowCloseRequested |
Event that is raised when the window close is requested.
Definition at line 239 of file ShellViewModel.cs.