From ca50e0c8fc88acd06d6e1932e9412464bff95edb Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 12 Jun 2018 19:04:09 +0300 Subject: Working on PPC modules and loading. --- .../PPC/Tango.PPC.Common/PPCModuleBase.cs | 49 ++++------------------ 1 file changed, 8 insertions(+), 41 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs index 31c3218db..d4d00064c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs @@ -18,12 +18,11 @@ namespace Tango.PPC.Common public abstract class PPCModuleBase : ExtendedObject, IPPCModule { private bool _isInitialized; - private bool _isLoaded; /// - /// Occurs when the user has navigated into or out of this module. + /// Occurs when the module has been initialized. /// - public event EventHandler IsLoadedChanged; + public event EventHandler Initialized; /// /// Gets the module name. @@ -65,32 +64,6 @@ namespace Tango.PPC.Common } } - /// - /// Sets a value indicating whether this module is loaded. - /// - public bool IsLoaded - { - get - { - return _isLoaded; - } - set - { - _isLoaded = value; - IsLoadedChanged?.Invoke(this, value); - } - } - - private bool _inNewWindow; - /// - /// Gets or sets a value indicating whether this module is shown under a new window. - /// - public bool InNewWindow - { - get { return _inNewWindow; } - set { _inNewWindow = value; RaisePropertyChangedAuto(); } - } - /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// @@ -101,8 +74,11 @@ namespace Tango.PPC.Common /// public void Initialize() { - OnInitialized(); - IsInitialized = true; + if (!IsInitialized) + { + OnInitialized(); + IsInitialized = true; + } } /// @@ -110,16 +86,7 @@ namespace Tango.PPC.Common /// protected virtual void OnInitialized() { - - } - - /// - /// Raises the event. - /// - /// if set to true the module is loaded. - protected virtual void OnLoadedChanged(bool loaded) - { - + Initialized?.Invoke(this, new EventArgs()); } } } -- cgit v1.3.1