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();
        }
        public override bool Equals(object obj)
        {
            EmulatorManagerConfigKey other = obj as EmulatorManagerConfigKey;

            if (other != null)
            {
                return(other.EmulatorName == EmulatorName &&
                       other.EmulatorVersion == EmulatorVersion);
            }
            else
            {
                return(false);
            }
        }
        private void RemoveCustomEmulator(IReadOnlyEmulator emulator)
        {
            EmulatorManagerConfigKey key = new EmulatorManagerConfigKey()
            {
                EmulatorName    = emulator.EmulatorName,
                EmulatorVersion = emulator.Version
            };

            if (loadedConfig.ContainsKey(key))
            {
                loadedConfig.Remove(key);
            }
            if (availableEmulators.ContainsKey(emulator))
            {
                availableEmulators.Remove(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();
        }