aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/ProjectItemsViews
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.IDE/ProjectItemsViews')
0 files changed, 0 insertions, 0 deletions
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.DAL.Observables;
using Tango.MachineStudio.Common;
using Tango.MachineStudio.DB.Views;

namespace Tango.MachineStudio.DB
{
    /// <summary>
    /// Represents a Machine Studio database module.
    /// </summary>
    /// <seealso cref="Tango.MachineStudio.Common.IStudioModule" />
    public class DBModule : IStudioModule
    {
        private bool _isInitialized;
        private bool _isLoaded;

        /// <summary>
        /// Gets the module name.
        /// </summary>
        public string Name => "Data Base";

        /// <summary>
        /// Gets the module description.
        /// </summary>
        public 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");

        /// <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;

        /// <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; }

        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        /// <exception cref="NotImplementedException"></exception>
        public void Dispose()
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Perform any operations required to initialize this module.
        /// </summary>
        public void Initialize()
        {
            if (!_isInitialized)
            {
                //Initialize

                _isInitialized = true;
            }
        }
    }
}