diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs index 5e584f891..98eef6883 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs @@ -16,7 +16,10 @@ using Tango.PPC.Common.Navigation; using Tango.PPC.Common.Notifications; using Tango.PPC.Common.Printing; using Tango.PPC.Common.RemoteAssistance; +using Tango.PPC.Common.RemoteDesktop; using Tango.PPC.Common.Storage; +using Tango.PPC.Common.Synchronization; +using Tango.PPC.Common.ThreadLoading; using Tango.Settings; using Tango.SharedUI; using static Tango.SharedUI.Controls.NavigationControl; @@ -27,7 +30,7 @@ namespace Tango.PPC.Common /// Represents a PPC view model base class. /// </summary> /// <seealso cref="Tango.SharedUI.ViewModel" /> - public abstract class PPCViewModel : ViewModel, INavigationViewModel, INavigationBlocker + public abstract class PPCViewModel : ViewModel, INavigationBlocker { /// <summary> /// Gets the static observable entities adapter. @@ -109,6 +112,24 @@ namespace Tango.PPC.Common [TangoInject] public IEventLogger EventLogger { get; set; } + /// <summary> + /// Gets or sets the machine data synchronizer. + /// </summary> + [TangoInject] + public IMachineDataSynchronizer MachineDataSynchronizer { get; set; } + + /// <summary> + /// Gets or sets the remote desktop service. + /// </summary> + [TangoInject] + public IRemoteDesktopService RemoteDesktopService { get; set; } + + /// <summary> + /// Gets or sets the thread loading service. + /// </summary> + [TangoInject] + public IThreadLoadingService ThreadLoadingService { get; set; } + private PPCSettings _settings; /// <summary> /// Gets the main PPC settings. @@ -159,6 +180,15 @@ namespace Tango.PPC.Common } /// <summary> + /// Called when the navigation system has navigated to this VM view. + /// </summary> + /// <param name="fromVM">The view model instance of the previous view model</param> + public virtual void OnNavigatedTo(PPCViewModel fromVM) + { + + } + + /// <summary> /// Called when the navigation system has navigated from this VM view. /// </summary> public virtual void OnNavigatedFrom() @@ -167,6 +197,22 @@ namespace Tango.PPC.Common } /// <summary> + /// Called before the navigation system has navigated to this VM view. + /// </summary> + public virtual void OnBeforeNavigatedTo() + { + + } + + /// <summary> + /// Called before the navigation system has navigated from this VM view. + /// </summary> + public virtual void OnBeforeNavigatedFrom() + { + IsVisible = false; + } + + /// <summary> /// Raises the specified message using the default <see cref="TangoMessenger"/>. /// </summary> /// <typeparam name="T"></typeparam> @@ -220,7 +266,7 @@ namespace Tango.PPC.Common /// </summary> public virtual void OnApplicationReady() { - + } } |
