From d33c19b3ac6803de4b5c8d475832efef131c1a45 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 30 Dec 2020 15:11:34 +0000 Subject: Revert "Hope it is fine" --- .../PPC/Tango.PPC.Common/PPCViewModel.cs | 50 +++++++++++++++++++++- 1 file changed, 48 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs') 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. /// /// - public abstract class PPCViewModel : ViewModel, INavigationViewModel, INavigationBlocker + public abstract class PPCViewModel : ViewModel, INavigationBlocker { /// /// Gets the static observable entities adapter. @@ -109,6 +112,24 @@ namespace Tango.PPC.Common [TangoInject] public IEventLogger EventLogger { get; set; } + /// + /// Gets or sets the machine data synchronizer. + /// + [TangoInject] + public IMachineDataSynchronizer MachineDataSynchronizer { get; set; } + + /// + /// Gets or sets the remote desktop service. + /// + [TangoInject] + public IRemoteDesktopService RemoteDesktopService { get; set; } + + /// + /// Gets or sets the thread loading service. + /// + [TangoInject] + public IThreadLoadingService ThreadLoadingService { get; set; } + private PPCSettings _settings; /// /// Gets the main PPC settings. @@ -158,6 +179,15 @@ namespace Tango.PPC.Common IsVisible = true; } + /// + /// Called when the navigation system has navigated to this VM view. + /// + /// The view model instance of the previous view model + public virtual void OnNavigatedTo(PPCViewModel fromVM) + { + + } + /// /// Called when the navigation system has navigated from this VM view. /// @@ -166,6 +196,22 @@ namespace Tango.PPC.Common IsVisible = false; } + /// + /// Called before the navigation system has navigated to this VM view. + /// + public virtual void OnBeforeNavigatedTo() + { + + } + + /// + /// Called before the navigation system has navigated from this VM view. + /// + public virtual void OnBeforeNavigatedFrom() + { + IsVisible = false; + } + /// /// Raises the specified message using the default . /// @@ -220,7 +266,7 @@ namespace Tango.PPC.Common /// public virtual void OnApplicationReady() { - + } } -- cgit v1.3.1