protected void InitializeSim(string[] registryPaths, string appDataPath, string programDataPath, string text, int value, string configFile) { SimulatorOption option = new SimulatorOption(text, value, registryPaths); option.SetAppDataPath(appDataPath); option.SetProgramDataPath(programDataPath); InitializeComboSimPath(option); option.SetSimConfigFile(configFile); instance.simOptions.Add(option); }
/** * Initializes the sim path in a specific SimuatorOption. */ protected bool InitializeComboSimPath(SimulatorOption simulatorOption) { if (simulatorOption == null) { return(false); } string[] registryPaths = simulatorOption.GetRegistryPaths(); foreach (string registryPath in registryPaths) { string simPath = RegistryInterface.GetRegistryValue(registryPath); if (!simPath.Equals("") && !simPath.Equals("1") && !simPath.Equals("0")) { simulatorOption.SetSimPath(simPath); return(true); } } return(false); }
/** * Returns whether 2 simulator options are the same option. */ public bool Equals(SimulatorOption parallelSimOption) { return(parallelSimOption.GetText().Equals(this.GetText()) && parallelSimOption.GetValue().Equals(this.GetValue())); }