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) { if (plugins == null) return; 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; } }