public void AddCustomEmulator(CustomEmulator emulator) { EmulatorManagerConfigKey key = new EmulatorManagerConfigKey() { EmulatorName = emulator.EmulatorName, EmulatorVersion = emulator.Version }; EmulatorManagerConfig cfg; if (!loadedConfig.TryGetValue(key, out cfg)) { cfg = new EmulatorManagerConfig() { Installed = true, CustomConfig = new CustomEmulatorConfig() { PathToExecutable = emulator.PathToExecutable, CommandLineArgs = emulator.CommandLineArguments, Consoles = emulator.ConsoleNames } }; loadedConfig.Add(key, cfg); } if (!availableEmulators.ContainsKey(emulator)) { availableEmulators.Add(emulator, emulator); } else { availableEmulators[emulator] = emulator; } UpdateConfiguration(); }
private void UpdateConfigProperty(IReadOnlyEmulator emulator, Boolean installed) { EmulatorManagerConfig cfg; var key = new EmulatorManagerConfigKey() { EmulatorName = emulator.EmulatorName, EmulatorVersion = emulator.Version }; if (!loadedConfig.TryGetValue(key, out cfg)) { cfg = new EmulatorManagerConfig(); loadedConfig.Add(key, cfg); } cfg.Installed = installed; UpdateConfiguration(); }