diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-12 19:04:09 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-12 19:04:09 +0300 |
| commit | ca50e0c8fc88acd06d6e1932e9412464bff95edb (patch) | |
| tree | aaafb06deca983c1e80c8c34508d23a452e4a235 /Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs | |
| parent | 8a59643571080bfff715f0b0e4bb03e2dee4961a (diff) | |
| download | Tango-ca50e0c8fc88acd06d6e1932e9412464bff95edb.tar.gz Tango-ca50e0c8fc88acd06d6e1932e9412464bff95edb.zip | |
Working on PPC modules and loading.
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()); } } } |
