private static bool IsParameterlessSwitchEnabled(ParameterlessSwitchInfo parameterlessSwitch) { if (parameterlessSwitch.lightUpKey == null) { return(true); } if (!parameterlessSwitch.lightUpKeyRead) { parameterlessSwitch.lightUpKeyRead = true; parameterlessSwitch.lightUpKeyResult = ReadLightupBool(parameterlessSwitch.lightUpKey); } return(parameterlessSwitch.lightUpKeyResult); }
/// <summary> /// Returns true if the switch is enabled. Handles lightup logic. /// </summary> private static bool IsParameterlessSwitchEnabled(ParameterlessSwitchInfo parameterlessSwitch) { if (parameterlessSwitch.lightUpKey == null) { return(true); } if (parameterlessSwitch.lightUpKeyRead) { return(parameterlessSwitch.lightUpKeyResult); } // Need to read the registry parameterlessSwitch.lightUpKeyRead = true; parameterlessSwitch.lightUpKeyResult = ReadLightupBool(parameterlessSwitch.lightUpKey); return(parameterlessSwitch.lightUpKeyResult); }
/// <summary> /// Returns true if the switch is enabled. Handles lightup logic. /// </summary> private static bool IsParameterlessSwitchEnabled(ParameterlessSwitchInfo parameterlessSwitch) { if (parameterlessSwitch.lightUpKey == null) { return true; } if (parameterlessSwitch.lightUpKeyRead) { return parameterlessSwitch.lightUpKeyResult; } // Need to read the registry parameterlessSwitch.lightUpKeyRead = true; parameterlessSwitch.lightUpKeyResult = ReadLightupBool(parameterlessSwitch.lightUpKey); return parameterlessSwitch.lightUpKeyResult; }