Vereinsmeisterschaften  22aa7800eae54b428d40e835886cefe1fdefdfdf
This is a software that can be used to manage the internal competition of the swimming club Illertissen called "Vereinsmeisterschaften".
Loading...
Searching...
No Matches
Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel Class Reference

ViewModel for the workspace manager. More...

Inheritance diagram for Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel:
Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel

Public Member Functions

 WorkspaceManagerViewModel (IWorkspaceService workspaceService, IDialogCoordinator dialogCoordinator, ShellViewModel shellVM, INavigationService navigationService)
 Constructor of the workspace view model.
 
- Public Member Functions inherited from Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel
delegate void WorkspaceLoadedDelegate (WorkspaceManagerViewModel workspaceManagerViewModel, string currentWorkspacePath)
 Delegate void for the OnWorkspaceLoaded event.
 

Static Public Attributes

const string DEFAULT_TEMPLATE_ZIP_FILE_NAME = "DefaultTemplates.zip"
 This is the file name for the default templates ZIP (this name should match the name used in the PostBuildEvent of the Vereinsmeisterschaften.csproj)
 

Properties

string CurrentWorkspaceFolder [get]
 Current workspace folder path.
 
bool HasUnsavedChanges [get]
 True if the workspace has unsaved changes, false otherwise.
 
ObservableCollection< string > LastWorkspacePaths [get]
 List with previous workspace paths.
 
ICommand CloseWorkspaceCommand [get]
 Command to close the current workspace.
 
ICommand SaveWorkspaceCommand [get]
 Command to save the current workspace to a folder.
 
ICommand LoadWorkspaceCommand [get]
 Command to load a workspace from a folder.
 
ICommand LoadLastWorkspaceCommand [get]
 Command to load a previous workspace from the selected folder (command parameter).
 
ICommand OpenWorkspaceFolderCommand [get]
 Command to open the current workspace folder in the file explorer.
 
ICommand CreateNewWorkspaceCommand [get]
 Command to create a new workspace (add all configuration files to the folder and optionally add default templates)
 
ICommand ClearAllLastWorkspacePathsCommand [get]
 Clear all LastWorkspacePaths
 

Events

IWorkspaceManagerViewModel.WorkspaceLoadedDelegate OnWorkspaceLoaded
 
- Events inherited from Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel
WorkspaceLoadedDelegate OnWorkspaceLoaded
 Event that his raised when the LoadWorkspaceCommand was executed successfully.
 

Private Member Functions

void copyFilesFromOldWorkspace (string oldWorkspacePath, string newWorkspacePath, string fileNameResourceKey)
 Copy the file identified by the fileNameResourceKey from the oldWorkspacePath to the newWorkspacePath Only use this before the workspace is loaded because this method only copies files.
 
void copyTemplatesFolderFromOldWorkspace (string oldWorkspacePath, string newWorkspacePath)
 Copy the templates folder from the oldWorkspacePath to the newWorkspacePath
 
void _workspaceService_PropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
 

Private Attributes

ICommand _closeWorkspaceCommand
 
ICommand _saveWorkspaceCommand
 
ICommand _loadWorkspaceCommand
 
ICommand _loadLastWorkspaceCommand
 
ICommand _openWorkspaceFolderCommand
 
ICommand _createNewWorkspaceCommand
 
ICommand _clearAllLastWorkspacePathsCommand
 
IWorkspaceService _workspaceService
 
IDialogCoordinator _dialogCoordinator
 
ShellViewModel _shellVM
 
INavigationService _navigationService
 

Detailed Description

ViewModel for the workspace manager.

Definition at line 24 of file WorkspaceManagerViewModel.cs.

Constructor & Destructor Documentation

◆ WorkspaceManagerViewModel()

Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.WorkspaceManagerViewModel ( IWorkspaceService workspaceService,
IDialogCoordinator dialogCoordinator,
ShellViewModel shellVM,
INavigationService navigationService )

Constructor of the workspace view model.

Parameters
workspaceServiceIWorkspaceService object
dialogCoordinatorIDialogCoordinator object
shellVMShellViewModel object used for dialog display
navigationServiceINavigationService object

Definition at line 363 of file WorkspaceManagerViewModel.cs.

Member Function Documentation

◆ _workspaceService_PropertyChanged()

void Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._workspaceService_PropertyChanged ( object sender,
System.ComponentModel.PropertyChangedEventArgs e )
private

Definition at line 376 of file WorkspaceManagerViewModel.cs.

◆ copyFilesFromOldWorkspace()

void Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.copyFilesFromOldWorkspace ( string oldWorkspacePath,
string newWorkspacePath,
string fileNameResourceKey )
private

Copy the file identified by the fileNameResourceKey from the oldWorkspacePath to the newWorkspacePath Only use this before the workspace is loaded because this method only copies files.

Parameters
oldWorkspacePathPath to the old workspace with the source file
newWorkspacePathPath to the new workspace where the file should be copied to
fileNameResourceKeyKey used to identify the file (e.g. WorkspaceService.KEY_FILENAME_COMPETITIONS)

Definition at line 274 of file WorkspaceManagerViewModel.cs.

◆ copyTemplatesFolderFromOldWorkspace()

void Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.copyTemplatesFolderFromOldWorkspace ( string oldWorkspacePath,
string newWorkspacePath )
private

Copy the templates folder from the oldWorkspacePath to the newWorkspacePath

Parameters
oldWorkspacePathPath to the old workspace with the source file
newWorkspacePathPath to the new workspace where the file should be copied to

Definition at line 302 of file WorkspaceManagerViewModel.cs.

Member Data Documentation

◆ _clearAllLastWorkspacePathsCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._clearAllLastWorkspacePathsCommand
private

Definition at line 333 of file WorkspaceManagerViewModel.cs.

◆ _closeWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._closeWorkspaceCommand
private

Definition at line 50 of file WorkspaceManagerViewModel.cs.

◆ _createNewWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._createNewWorkspaceCommand
private

Definition at line 188 of file WorkspaceManagerViewModel.cs.

◆ _dialogCoordinator

IDialogCoordinator Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._dialogCoordinator
private

Definition at line 352 of file WorkspaceManagerViewModel.cs.

◆ _loadLastWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._loadLastWorkspaceCommand
private

Definition at line 136 of file WorkspaceManagerViewModel.cs.

◆ _loadWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._loadWorkspaceCommand
private

Definition at line 95 of file WorkspaceManagerViewModel.cs.

◆ _navigationService

INavigationService Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._navigationService
private

Definition at line 354 of file WorkspaceManagerViewModel.cs.

◆ _openWorkspaceFolderCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._openWorkspaceFolderCommand
private

Definition at line 172 of file WorkspaceManagerViewModel.cs.

◆ _saveWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._saveWorkspaceCommand
private

Definition at line 79 of file WorkspaceManagerViewModel.cs.

◆ _shellVM

ShellViewModel Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._shellVM
private

Definition at line 353 of file WorkspaceManagerViewModel.cs.

◆ _workspaceService

IWorkspaceService Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel._workspaceService
private

Definition at line 351 of file WorkspaceManagerViewModel.cs.

◆ DEFAULT_TEMPLATE_ZIP_FILE_NAME

const string Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.DEFAULT_TEMPLATE_ZIP_FILE_NAME = "DefaultTemplates.zip"
static

This is the file name for the default templates ZIP (this name should match the name used in the PostBuildEvent of the Vereinsmeisterschaften.csproj)

Definition at line 29 of file WorkspaceManagerViewModel.cs.

Property Documentation

◆ ClearAllLastWorkspacePathsCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.ClearAllLastWorkspacePathsCommand
get

◆ CloseWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.CloseWorkspaceCommand
get

Command to close the current workspace.

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 52 of file WorkspaceManagerViewModel.cs.

◆ CreateNewWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.CreateNewWorkspaceCommand
get

Command to create a new workspace (add all configuration files to the folder and optionally add default templates)

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 190 of file WorkspaceManagerViewModel.cs.

◆ CurrentWorkspaceFolder

string Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.CurrentWorkspaceFolder
get

Current workspace folder path.

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 36 of file WorkspaceManagerViewModel.cs.

◆ HasUnsavedChanges

bool Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.HasUnsavedChanges
get

True if the workspace has unsaved changes, false otherwise.

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 39 of file WorkspaceManagerViewModel.cs.

◆ LastWorkspacePaths

ObservableCollection<string> Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.LastWorkspacePaths
get

List with previous workspace paths.

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 42 of file WorkspaceManagerViewModel.cs.

◆ LoadLastWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.LoadLastWorkspaceCommand
get

Command to load a previous workspace from the selected folder (command parameter).

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 138 of file WorkspaceManagerViewModel.cs.

◆ LoadWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.LoadWorkspaceCommand
get

Command to load a workspace from a folder.

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 97 of file WorkspaceManagerViewModel.cs.

◆ OpenWorkspaceFolderCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.OpenWorkspaceFolderCommand
get

Command to open the current workspace folder in the file explorer.

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 174 of file WorkspaceManagerViewModel.cs.

◆ SaveWorkspaceCommand

ICommand Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.SaveWorkspaceCommand
get

Command to save the current workspace to a folder.

Implements Vereinsmeisterschaften.Contracts.ViewModels.IWorkspaceManagerViewModel.

Definition at line 81 of file WorkspaceManagerViewModel.cs.

Event Documentation

◆ OnWorkspaceLoaded

IWorkspaceManagerViewModel.WorkspaceLoadedDelegate Vereinsmeisterschaften.ViewModels.WorkspaceManagerViewModel.OnWorkspaceLoaded

Definition at line 345 of file WorkspaceManagerViewModel.cs.


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