diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs | 49 |
1 files changed, 8 insertions, 41 deletions
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; /// <summary> - /// Occurs when the user has navigated into or out of this module. + /// Occurs when the module has been initialized. /// </summary> - public event EventHandler<bool> IsLoadedChanged; + public event EventHandler Initialized; /// <summary> /// Gets the module name. @@ -66,32 +65,6 @@ namespace Tango.PPC.Common } /// <summary> - /// Sets a value indicating whether this module is loaded. - /// </summary> - public bool IsLoaded - { - get - { - return _isLoaded; - } - set - { - _isLoaded = value; - IsLoadedChanged?.Invoke(this, value); - } - } - - private bool _inNewWindow; - /// <summary> - /// Gets or sets a value indicating whether this module is shown under a new window. - /// </summary> - public bool InNewWindow - { - get { return _inNewWindow; } - set { _inNewWindow = value; RaisePropertyChangedAuto(); } - } - - /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public abstract void Dispose(); @@ -101,8 +74,11 @@ namespace Tango.PPC.Common /// </summary> public void Initialize() { - OnInitialized(); - IsInitialized = true; + if (!IsInitialized) + { + OnInitialized(); + IsInitialized = true; + } } /// <summary> @@ -110,16 +86,7 @@ namespace Tango.PPC.Common /// </summary> protected virtual void OnInitialized() { - - } - - /// <summary> - /// Raises the <see cref="IsLoadedChanged"/> event. - /// </summary> - /// <param name="loaded">if set to <c>true</c> the module is loaded.</param> - protected virtual void OnLoadedChanged(bool loaded) - { - + Initialized?.Invoke(this, new EventArgs()); } } } |
