private bool IsPluginEnabled(ISecondMonitorPlugin plugin)
 {
     if (_pluginSettingsProvider.TryIsPluginEnabled(plugin.PluginName, out bool isEnabled))
     {
         Logger.Info($"Plugin {plugin.PluginName} is Enabled: {isEnabled}");
         return(isEnabled);
     }
     _pluginSettingsProvider.SetPluginEnabled(plugin.PluginName, plugin.IsEnabledByDefault);
     Logger.Info($"Plugin {plugin.PluginName} is Enabled: {plugin.IsEnabledByDefault}");
     return(plugin.IsEnabledByDefault);
 }
        private void InitializePluginsList()
        {
            string pluginsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "plugins");

            _allPlugins = _pluginsManager.GetPluginsFromPath(pluginsDirectory, true).ToList();
            foreach (ISecondMonitorPlugin secondMonitorPlugin in _allPlugins)
            {
                if (!_pluginSettingsProvider.TryIsPluginEnabled(secondMonitorPlugin.PluginName, out bool isEnabled))
                {
                    _pluginSettingsProvider.SetPluginEnabled(secondMonitorPlugin.PluginName, secondMonitorPlugin.IsEnabledByDefault);
                }
            }
        }