public static void EnablePlugin(IElektronikPlugin plugin)
 {
     if (!ActivePlugins.Contains(plugin))
     {
         ActivePlugins.Add(plugin);
     }
 }
 public static void DisablePlugin(IElektronikPlugin plugin)
 {
     if (ActivePlugins.Contains(plugin))
     {
         ActivePlugins.Remove(plugin);
     }
 }
        private void DisableOfflinePlugins(IElektronikPlugin except)
        {
            var plugins = PluginsListBox.OfType <PluginListBoxItem>()
                          .Where(lbi => lbi.Plugin is IDataSourcePluginOffline && lbi.Plugin != except);

            foreach (var plugin in plugins)
            {
                plugin.Toggle(false);
            }
        }
Ejemplo n.º 4
0
        public static string GetVersion(this IElektronikPlugin plugin)
        {
            var version = plugin.GetType().Assembly.GetName().Version;

            return($"{version.Major}.{version.Minor}");
        }