private static void OpenOption(string keyName, string valueName, bool open) { Int32 value = GetInt32Value(keyName, valueName, 0); IntUtil.TriggleBits(ref value, 0x00000001, open); Registry.SetValue(keyName, valueName, value, RegistryValueKind.DWord); }
private static Int32 GetNoDrivesValue(SortedDictionary <string, bool> driveVisibilityDict) { Int32 value = 0; foreach (var item in driveVisibilityDict) { if (noDrivesDict.ContainsKey(item.Key)) { IntUtil.TriggleBits(ref value, noDrivesDict[item.Key], !item.Value); } } return(value); }