private void PluginSetSelector_FormClosed(object sender, FormClosedEventArgs e) { // Clear any old plugin listings RegistryAccess.removeKey(Microsoft.Win32.Registry.CurrentUser, RegistryAccess.RegPaths.Halo2 + "PluginSets\\"); // We must always have at least a Default plugin if (pluginInfo.Names.Count == 0) { pluginInfo.Names.Add("Default"); pluginInfo.Paths.Add(Prefs.pathPluginsFolder); } // Write all the plugins back to the registry for (int i = 0; i < pluginInfo.Names.Count; i++) { RegistryAccess.setValue(Microsoft.Win32.Registry.CurrentUser, RegistryAccess.RegPaths.Halo2 + "PluginSets\\", pluginInfo.Names[i], pluginInfo.Paths[i]); } }