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. --- .../Modules/Tango.MachineStudio.DB/DBModule.cs | 43 ++++------------------ 1 file changed, 8 insertions(+), 35 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs') 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. /// /// - public class DBModule : IStudioModule + public class DBModule : StudioModuleBase { - private bool _isInitialized; - private bool _isLoaded; - /// /// Gets the module name. /// - public string Name => "Data Base"; + public override string Name => "Data Base"; /// /// Gets the module description. /// - public string Description => "Provides access to raw database tables."; + public override string Description => "Provides access to raw database tables."; /// /// Gets the module cover image. /// - public BitmapSource Image => SharedUI.Helpers.ResourceHelper.GetImageFromResources("Images/db.png"); + public override BitmapSource Image => SharedUI.Helpers.ResourceHelper.GetImageFromResources("Images/db.png"); /// /// Gets the module entry point view. /// - public FrameworkElement MainView => new MainDBView(); - - /// - /// Gets a value indicating whether this module has been initialized. - /// - public bool IsInitialized => _isInitialized; + public override FrameworkElement MainView => new MainDBView(); /// /// Gets the permission required to see and load this module. /// - public Permissions Permission => Permissions.RunDataBaseModule; - - /// - /// Sets a value indicating whether this module is loaded. - /// - public bool IsLoaded { get => _isLoaded; set => _isLoaded = value; } + public override Permissions Permission => Permissions.RunDataBaseModule; /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// - /// - public void Dispose() + public override void Dispose() { - throw new NotImplementedException(); - } - - /// - /// Perform any operations required to initialize this module. - /// - public void Initialize() - { - if (!_isInitialized) - { - //Initialize - - _isInitialized = true; - } + } } } -- cgit v1.3.1