From 94ac70f0eaf29fcca4ae3ff5552c52cad22df492 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 14 Feb 2018 10:55:19 +0200 Subject: Refactored all studio modules to use StudioModuleBase. --- .../Tango.MachineStudio.Common/StudioModuleBase.cs | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs index a773adf8b..5c594ab70 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioModuleBase.cs @@ -57,7 +57,7 @@ namespace Tango.MachineStudio.Common { return _isInitialized; } - protected set + private set { _isInitialized = value; } @@ -87,6 +87,27 @@ namespace Tango.MachineStudio.Common /// /// Perform any operations required to initialize this module. /// - public abstract void Initialize(); + public void Initialize() + { + OnInitialized(); + IsInitialized = true; + } + + /// + /// Called when machine studio initializes this module. + /// + protected virtual void OnInitialized() + { + + } + + /// + /// Raises the event. + /// + /// if set to true the module is loaded. + protected virtual void OnLoadedChanged(bool loaded) + { + + } } } -- cgit v1.3.1