Microscopic Traffic Simulator
|
Main application viewmodel. More...
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... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
PropertyChangedEventHandler | PropertyChanged |
Raised when a property on this object has a new value. More... | |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
Messenger | messenger |
Instance of messenger for communicating between view models. More... | |
Main application viewmodel.
Definition at line 12 of file MainViewModel.cs.
Microscopic_Traffic_Simulator.ViewModels.MainViewModel.MainViewModel | ( | IInteractions | interactions, |
ISettings | settings, | ||
Action< string > | switchLanguage | ||
) |
Initialization of main viewmodel.
interactions | Implementation of interactions to questions. |
settings | Implementation of application settings. |
switchLanguage | Action to apply after switching language. |
Definition at line 244 of file MainViewModel.cs.
void Microscopic_Traffic_Simulator.ViewModels.MainViewModel.Initialize | ( | string | newTopologyName, |
string | languageOnStartup | ||
) |
Creates new or open last opened geometric topology.
newTopologyName | String defining name of topology name in case that no previous opened topology was found. |
languageOnStartup | Language to be set after loading application. |
Definition at line 270 of file MainViewModel.cs.
|
get |
Viewmodel for canvas panel.
Definition at line 54 of file MainViewModel.cs.
|
get |
Viewmodel for construction panel.
Definition at line 64 of file MainViewModel.cs.
|
getset |
Viewmodel of current top panel.
Definition at line 42 of file MainViewModel.cs.
|
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.
|
getset |
Flag indicating whether all changes of topology were saved.
Definition at line 103 of file MainViewModel.cs.
|
get |
Command for creating new geometric topology.
Definition at line 146 of file MainViewModel.cs.
|
get |
Command for opening geometric topology.
Definition at line 166 of file MainViewModel.cs.
|
get |
Command for saving geometric topology as custom file.
Definition at line 186 of file MainViewModel.cs.
|
get |
Command for saving geometric topology to file of current topology.
Definition at line 206 of file MainViewModel.cs.
|
get |
Viewmodel for simulation control panel.
Definition at line 76 of file MainViewModel.cs.
|
get |
Command for switching language of application.
Definition at line 226 of file MainViewModel.cs.
|
getset |
Current culture (language) of application.
Definition at line 133 of file MainViewModel.cs.
EventHandler Microscopic_Traffic_Simulator.ViewModels.MainViewModel.AnotherTopologyInitializedOrOpened |
Event for initialization or opening of new topology.
Definition at line 32 of file MainViewModel.cs.