From 0dec8a74239cff769836cae577fbd84824070e83 Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 21 Apr 2018 19:49:05 +0300 Subject: Implemented NavigationControl for better performance!!! Redesign of machine studio module initialization. --- .../Tango.MachineStudio.Common/IStudioModule.cs | 4 +-- .../IStudioModuleViewVM.cs | 29 ++++++++++++++++++++++ .../Tango.MachineStudio.Common/StudioModuleBase.cs | 4 +-- .../Tango.MachineStudio.Common.csproj | 1 + 4 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModuleViewVM.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs index ee01def9e..6963892fa 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs @@ -32,9 +32,9 @@ namespace Tango.MachineStudio.Common BitmapSource Image { get; } /// - /// Gets the module entry point view. + /// Gets the module entry point view type. /// - FrameworkElement MainView { get; } + Type MainViewType { get; } /// /// Gets or sets a value indicating whether this module is shown under a new window. diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModuleViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModuleViewVM.cs new file mode 100644 index 000000000..1fd562590 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModuleViewVM.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.Common +{ + public interface IStudioModuleViewVM + { + /// + /// Called when the module . + /// + void OnNavigatedTo(); + /// + /// Called when [navigated from]. + /// + void OnNavigatedFrom(); + /// + /// Called when [shutting down]. + /// + void OnShuttingDown(); + /// + /// Called when the application is shutting down. + /// + /// + Task OnShutdownRequest(); + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs index 11da53c6c..68fe5b95e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs @@ -41,9 +41,9 @@ namespace Tango.MachineStudio.Common public abstract BitmapSource Image { get; } /// - /// Gets the module entry point view. + /// Gets the module entry point view type. /// - public abstract FrameworkElement MainView { get; } + public abstract Type MainViewType { get; } /// /// Gets the permission required to see and load this module. diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index bbbab06ab..ab99a3ad7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -107,6 +107,7 @@ + -- cgit v1.3.1