Beispiel #1
0
 public PluginInfoViewModel(PluginSetting setting, PluginKindId kindId)
     : base(null, false)
 {
     Name    = setting.Name;
     Enabled = setting.Enabled;
     Kind    = kindId;
 }
 public PluginInfoViewModel(PluginSetting setting, PluginKindId kindId)
   : base(false)
 {
   Name = setting.Name;
   Enabled = setting.Enabled;
   Kind = kindId;
 }
        private void AddPlugins(Func<string, bool> isLoadedFunc, string[] plugins, PluginKindId kind)
        {
            foreach (var pluginName in plugins)
              {
            var plugin = new PluginSetting(pluginName, isLoadedFunc(pluginName));
            Plugins.Add(new PluginInfoViewModel(plugin, kind));

            var saved = Settings.Current.Plugins.Find(p => p.Name == pluginName);
            if (saved != null)
              plugin.Enabled = saved.Enabled;
              }
        }
        private void AddPlugins(Func <string, bool> isLoadedFunc, string[] plugins, PluginKindId kind)
        {
            foreach (var pluginName in plugins)
            {
                var plugin = new PluginSetting(pluginName, isLoadedFunc(pluginName));
                Plugins.Add(new PluginInfoViewModel(plugin, kind));

                var saved = Settings.Current.Plugins.Find(p => p.Name == pluginName);
                if (saved != null)
                {
                    plugin.Enabled = saved.Enabled;
                }
            }
        }