using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Media.Imaging; using Tango.Integration.Observables; using Tango.MachineStudio.Common; using Tango.MachineStudio.DB.Views; namespace Tango.MachineStudio.DB { /// /// Represents a Machine Studio database module. /// /// public class DBModule : IStudioModule { private bool _isInitialized; private bool _isLoaded; /// /// Gets the module name. /// public string Name => "Data Base"; /// /// Gets the module description. /// public string Description => "Provides access to raw database tables."; /// /// Gets the module cover image. /// public 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; /// /// 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; } /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// /// public void Dispose() { throw new NotImplementedException(); } /// /// Perform any operations required to initialize this module. /// public void Initialize() { if (!_isInitialized) { //Initialize _isInitialized = true; } } } }