diff options
| author | Roy <roy.mail.net@gmail.com> | 2018-04-21 19:49:05 +0300 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2018-04-21 19:49:05 +0300 |
| commit | 0dec8a74239cff769836cae577fbd84824070e83 (patch) | |
| tree | d6cc24ee53454b3f17f1580e90de38238555b6bd /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common | |
| parent | 4df1724226c0d0941b970dbe71b1476e3c3e9902 (diff) | |
| download | Tango-0dec8a74239cff769836cae577fbd84824070e83.tar.gz Tango-0dec8a74239cff769836cae577fbd84824070e83.zip | |
Implemented NavigationControl for better performance!!!
Redesign of machine studio module initialization.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common')
4 files changed, 34 insertions, 4 deletions
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; } /// <summary> - /// Gets the module entry point view. + /// Gets the module entry point view type. /// </summary> - FrameworkElement MainView { get; } + Type MainViewType { get; } /// <summary> /// 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 + { + /// <summary> + /// Called when the module . + /// </summary> + void OnNavigatedTo(); + /// <summary> + /// Called when [navigated from]. + /// </summary> + void OnNavigatedFrom(); + /// <summary> + /// Called when [shutting down]. + /// </summary> + void OnShuttingDown(); + /// <summary> + /// Called when the application is shutting down. + /// </summary> + /// <returns></returns> + Task<bool> 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; } /// <summary> - /// Gets the module entry point view. + /// Gets the module entry point view type. /// </summary> - public abstract FrameworkElement MainView { get; } + public abstract Type MainViewType { get; } /// <summary> /// 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 @@ <Compile Include="ExtensionMethods\CommonDialogExtensions.cs" /> <Compile Include="Html\IHtmlPresenter.cs" /> <Compile Include="Helpers\GraphsHelper.cs" /> + <Compile Include="IStudioModuleViewVM.cs" /> <Compile Include="Messages\MachineConnectionChangedMessage.cs" /> <Compile Include="Notifications\BarItem.cs" /> <Compile Include="Notifications\DialogViewVM.cs" /> |
