/// <summary>
        /// Check if the Plugin is installed. Temporary solution to avoid recursive Message
        /// </summary>
        /// <param name="pluginName">Plugin to verify if exists</param>
        /// <returns></returns>
        private bool IsPluginInstalled(string pluginName)
        {
            PluginManagerExtended pluginsManager = new PluginManagerExtended(new PluginsForm())
            {
                IsWatchingForNewPlugins = true
            };

            pluginsManager.Initialize();
            var plugin = pluginsManager.ValidatedPlugins.FirstOrDefault(p => p.Metadata.Name == pluginName);

            return(plugin != null);
        }
Exemple #2
0
        public PluginsForm()
        {
            InitializeComponent();

            pluginsModels = new List <PluginModel>();

            pluginsManager = new PluginManagerExtended(this)
            {
                IsWatchingForNewPlugins = true
            };
            pluginsManager.Initialize();
            pluginsManager.PluginsListUpdated += pManager_PluginsListUpdated;

            MouseWheel += (sender, e) => pnlPlugins.Focus();
        }
        public PluginsForm()
        {
            InitializeComponent();

            // Set drawing optimizations
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            pluginsModels = new List <PluginModel>();

            pluginsManager = PluginManagerExtended.Instance;
            pluginsManager.IsWatchingForNewPlugins = true;
            pluginsManager.Initialize(this);
            pluginsManager.PluginsListUpdated += pManager_PluginsListUpdated;

            MouseWheel += (sender, e) => pnlPlugins.Focus();
        }