Microscopic Traffic Simulator
Microscopic_Traffic_Simulator.ViewModels.MainViewModel Class Reference

Main application viewmodel. More...

Inheritance diagram for Microscopic_Traffic_Simulator.ViewModels.MainViewModel:
Microscopic_Traffic_Simulator.ViewModels.ViewModelBase

Public Member Functions

 MainViewModel (IInteractions interactions, ISettings settings, Action< string > switchLanguage)
 Initialization of main viewmodel. More...
 
void Initialize (string newTopologyName, string languageOnStartup)
 Creates new or open last opened geometric topology. More...
 
- Public Member Functions inherited from Microscopic_Traffic_Simulator.ViewModels.ViewModelBase
void VerifyPropertyName (string propertyName)
 Warns the developer if this object does not have a public property with the specified name. This method does not exist in a Release build. More...
 
void Dispose ()
 Invoked when this object is being removed from the application and will be subject to garbage collection. More...
 

Properties

ViewModelBase CurrentTopPanelViewModel [get, set]
 Viewmodel of current top panel. More...
 
CanvasViewModel CanvasViewModel [get]
 Viewmodel for canvas panel. More...
 
ConstructionViewModel ConstructionViewModel [get]
 Viewmodel for construction panel. More...
 
SimulationControlViewModel SimulationControlViewModel [get]
 Viewmodel for simulation control panel. More...
 
string GeometricTopologyName [get, set]
 Name of geometric topology derived from file name where topology was saved or the name is assigned to "new". More...
 
bool HasChangesSaved [get, set]
 Flag indicating whether all changes of topology were saved. More...
 
string UICultureName [get, set]
 Current culture (language) of application. More...
 
ICommand NewGeometricTopologyCommand [get]
 Command for creating new geometric topology. More...
 
ICommand OpenGeometricTopologyCommand [get]
 Command for opening geometric topology. More...
 
ICommand SaveGeometricTopologyAsCommand [get]
 Command for saving geometric topology as custom file. More...
 
ICommand SaveGeometricTopologyCommand [get]
 Command for saving geometric topology to file of current topology. More...
 
ICommand SwitchLanguageCommand [get]
 Command for switching language of application. More...
 
- Properties inherited from Microscopic_Traffic_Simulator.ViewModels.ViewModelBase
virtual bool ThrowOnInvalidPropertyName [get]
 Returns whether an exception is thrown, or if a Debug.Fail() is used when an invalid property name is passed to the VerifyPropertyName method. The default value is false, but subclasses used by unit tests might override this property's getter to return true. More...
 

Events

EventHandler AnotherTopologyInitializedOrOpened
 Event for initialization or opening of new topology. More...
 
- Events inherited from Microscopic_Traffic_Simulator.ViewModels.ViewModelBase
PropertyChangedEventHandler PropertyChanged
 Raised when a property on this object has a new value. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Microscopic_Traffic_Simulator.ViewModels.ViewModelBase
 ViewModelBase ()
 Create viewmodel base. More...
 
virtual void OnPropertyChanged (string propertyName)
 Raises this object's PropertyChanged event. More...
 
virtual void OnDispose ()
 Child classes can override this method to perform clean-up logic, such as removing event handlers. More...
 
- Protected Attributes inherited from Microscopic_Traffic_Simulator.ViewModels.ViewModelBase
Messenger messenger
 Instance of messenger for communicating between view models. More...
 

Detailed Description

Main application viewmodel.

Definition at line 12 of file MainViewModel.cs.

Constructor & Destructor Documentation

Microscopic_Traffic_Simulator.ViewModels.MainViewModel.MainViewModel ( IInteractions  interactions,
ISettings  settings,
Action< string >  switchLanguage 
)

Initialization of main viewmodel.

Parameters
interactionsImplementation of interactions to questions.
settingsImplementation of application settings.
switchLanguageAction to apply after switching language.

Definition at line 244 of file MainViewModel.cs.

Member Function Documentation

void Microscopic_Traffic_Simulator.ViewModels.MainViewModel.Initialize ( string  newTopologyName,
string  languageOnStartup 
)

Creates new or open last opened geometric topology.

Parameters
newTopologyNameString defining name of topology name in case that no previous opened topology was found.
languageOnStartupLanguage to be set after loading application.

Definition at line 270 of file MainViewModel.cs.

Property Documentation

CanvasViewModel Microscopic_Traffic_Simulator.ViewModels.MainViewModel.CanvasViewModel
get

Viewmodel for canvas panel.

Definition at line 54 of file MainViewModel.cs.

ConstructionViewModel Microscopic_Traffic_Simulator.ViewModels.MainViewModel.ConstructionViewModel
get

Viewmodel for construction panel.

Definition at line 64 of file MainViewModel.cs.

ViewModelBase Microscopic_Traffic_Simulator.ViewModels.MainViewModel.CurrentTopPanelViewModel
getset

Viewmodel of current top panel.

Definition at line 42 of file MainViewModel.cs.

string Microscopic_Traffic_Simulator.ViewModels.MainViewModel.GeometricTopologyName
getset

Name of geometric topology derived from file name where topology was saved or the name is assigned to "new".

Definition at line 90 of file MainViewModel.cs.

bool Microscopic_Traffic_Simulator.ViewModels.MainViewModel.HasChangesSaved
getset

Flag indicating whether all changes of topology were saved.

Definition at line 103 of file MainViewModel.cs.

ICommand Microscopic_Traffic_Simulator.ViewModels.MainViewModel.NewGeometricTopologyCommand
get

Command for creating new geometric topology.

Definition at line 146 of file MainViewModel.cs.

ICommand Microscopic_Traffic_Simulator.ViewModels.MainViewModel.OpenGeometricTopologyCommand
get

Command for opening geometric topology.

Definition at line 166 of file MainViewModel.cs.

ICommand Microscopic_Traffic_Simulator.ViewModels.MainViewModel.SaveGeometricTopologyAsCommand
get

Command for saving geometric topology as custom file.

Definition at line 186 of file MainViewModel.cs.

ICommand Microscopic_Traffic_Simulator.ViewModels.MainViewModel.SaveGeometricTopologyCommand
get

Command for saving geometric topology to file of current topology.

Definition at line 206 of file MainViewModel.cs.

SimulationControlViewModel Microscopic_Traffic_Simulator.ViewModels.MainViewModel.SimulationControlViewModel
get

Viewmodel for simulation control panel.

Definition at line 76 of file MainViewModel.cs.

ICommand Microscopic_Traffic_Simulator.ViewModels.MainViewModel.SwitchLanguageCommand
get

Command for switching language of application.

Definition at line 226 of file MainViewModel.cs.

string Microscopic_Traffic_Simulator.ViewModels.MainViewModel.UICultureName
getset

Current culture (language) of application.

Definition at line 133 of file MainViewModel.cs.

Event Documentation

EventHandler Microscopic_Traffic_Simulator.ViewModels.MainViewModel.AnotherTopologyInitializedOrOpened

Event for initialization or opening of new topology.

Definition at line 32 of file MainViewModel.cs.


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