diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-14 10:55:19 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-14 10:55:19 +0200 |
| commit | 94ac70f0eaf29fcca4ae3ff5552c52cad22df492 (patch) | |
| tree | 0f1fbfe8ff4ad11cfda38153a92bce057fd7a71e /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs | |
| parent | ee88fc31d9b1b8f4782c7103d91de2d1b11c211b (diff) | |
| download | Tango-94ac70f0eaf29fcca4ae3ff5552c52cad22df492.tar.gz Tango-94ac70f0eaf29fcca4ae3ff5552c52cad22df492.zip | |
Refactored all studio modules to use StudioModuleBase.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs | 43 |
1 files changed, 8 insertions, 35 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs index 82cd716b3..0ad6aa541 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs @@ -15,66 +15,39 @@ namespace Tango.MachineStudio.DB /// Represents a Machine Studio database module. /// </summary> /// <seealso cref="Tango.MachineStudio.Common.IStudioModule" /> - public class DBModule : IStudioModule + public class DBModule : StudioModuleBase { - private bool _isInitialized; - private bool _isLoaded; - /// <summary> /// Gets the module name. /// </summary> - public string Name => "Data Base"; + public override string Name => "Data Base"; /// <summary> /// Gets the module description. /// </summary> - public string Description => "Provides access to raw database tables."; + public override string Description => "Provides access to raw database tables."; /// <summary> /// Gets the module cover image. /// </summary> - public BitmapSource Image => SharedUI.Helpers.ResourceHelper.GetImageFromResources("Images/db.png"); + public override BitmapSource Image => SharedUI.Helpers.ResourceHelper.GetImageFromResources("Images/db.png"); /// <summary> /// Gets the module entry point view. /// </summary> - public FrameworkElement MainView => new MainDBView(); - - /// <summary> - /// Gets a value indicating whether this module has been initialized. - /// </summary> - public bool IsInitialized => _isInitialized; + public override FrameworkElement MainView => new MainDBView(); /// <summary> /// Gets the permission required to see and load this module. /// </summary> - public Permissions Permission => Permissions.RunDataBaseModule; - - /// <summary> - /// Sets a value indicating whether this module is loaded. - /// </summary> - public bool IsLoaded { get => _isLoaded; set => _isLoaded = value; } + public override Permissions Permission => Permissions.RunDataBaseModule; /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> - /// <exception cref="NotImplementedException"></exception> - public void Dispose() + public override void Dispose() { - throw new NotImplementedException(); - } - - /// <summary> - /// Perform any operations required to initialize this module. - /// </summary> - public void Initialize() - { - if (!_isInitialized) - { - //Initialize - - _isInitialized = true; - } + } } } |
