From ee697f7a3350d0a97bddee4de3a2ae4f9d285052 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 2 May 2018 17:36:54 +0300 Subject: merge --- .../Tango.MachineStudio.Common/StudioViewModel.cs | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs index 9c7e52d23..77fad1fc6 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs @@ -7,6 +7,79 @@ using Tango.SharedUI; namespace Tango.MachineStudio.Common { + /// + /// Represents a Machine Studio view model + /// + /// The type of the module. + /// + /// + public abstract class StudioViewModelInternal : ViewModel, IStudioViewModel + { + /// + /// Gets or sets a value indicating whether this view model studio module is currently loaded. + /// + public bool IsModuleLoaded { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public StudioViewModelInternal() : base() + { + + } + + /// + /// Called when another module has wants to navigate to this module with some arguments. + /// + /// The arguments. + public virtual void OnModuleRequest(params object[] args) + { + + } + + /// + /// Called when the user has navigated out of the module. + /// + public virtual void OnNavigatedFrom() + { + IsModuleLoaded = false; + } + + /// + /// Called when the user has navigated in to the module. + /// + public virtual void OnNavigatedTo() + { + IsModuleLoaded = true; + } + + /// + /// Called before the application is shutting down. + /// Return false to cancel the shutdown in case an important process is in progress. + /// + /// + public virtual Task OnShutdownRequest() + { + return Task.FromResult(true); + } + + /// + /// Called when application is shutting down. + /// + public virtual void OnShuttingDown() + { + + } + + /// + /// Called when the application has been started + /// + public virtual void OnApplicationStarted() + { + + } + } + /// /// Represents a Machine Studio view model /// @@ -70,6 +143,14 @@ namespace Tango.MachineStudio.Common { } + + /// + /// Called when the application has been started + /// + public virtual void OnApplicationStarted() + { + + } } /// @@ -90,6 +171,14 @@ namespace Tango.MachineStudio.Common } + /// + /// Called when the application has been started + /// + public virtual void OnApplicationStarted() + { + + } + /// /// Called when another module has wants to navigate to this module with some arguments. /// -- cgit v1.3.1