Esempio n. 1
0
 public PortDefinition_PeristableEmulator(Emulator emulator)
     : base(emulator.name, null)
 {
     m_emulator = emulator;
 }
Esempio n. 2
0
        private void AppendEmulators(List<Emulator> emulators, RegistryKey topLevelKey)
        {
            using (RegistryKey key = GetDeviceFrameworkPaths.OpenDeviceFrameworkKey(topLevelKey, m_runtimeVersionInstalled, RegistryKeys.Emulators))
            {
                if (key != null)
                {
                    string[] subkeyNames = key.GetSubKeyNames();

                    for (int iSubkey = 0; iSubkey < subkeyNames.Length; iSubkey++)
                    {
                        string subkeyName = subkeyNames[iSubkey];

                        using (RegistryKey subkey = key.OpenSubKey(subkeyName))
                        {
                            string path = subkey.GetValue(RegistryValues.EmulatorPath) as string;
                            string name = subkey.GetValue(RegistryValues.EmulatorName) as string;
                            string config = subkey.GetValue(RegistryValues.EmulatorConfig) as string;
                            string options = subkey.GetValue(RegistryValues.EmulatorOptions) as string;
                            int? legacyCommandLine = subkey.GetValue(RegistryValues.EmulatorLegacyCommandLine) as int?;
                            bool fLegacyCommandLine;
                            string persistableName = subkeyName;

                            if (string.IsNullOrEmpty(name))
                            {
                                name = persistableName;
                            }

                            fLegacyCommandLine = legacyCommandLine != null && legacyCommandLine.Value != 0;

                            Emulator emulator = new Emulator();
                            emulator.additionalOptions = options;
                            emulator.application = path;
                            emulator.config = config;
                            emulator.legacyCommandLine = fLegacyCommandLine;
                            emulator.name = name;
                            emulator.persistableName = persistableName;

                            emulators.Add(emulator);
                        }
                    }
                }
            }

        }
Esempio n. 3
0
 public PortDefinition_PeristableEmulator(Emulator emulator)
     : base(emulator.name, null)
 {
     m_emulator = emulator;
 }