private void ChangeRegistry(string path, string name, object data, int count = 1) { try { RegistryKey key = RegPath.GetCreatePath(path, count); key.SetValue(name, data); //sets 'someData' in 'someValue' key.Close(); } catch (Exception ex) { Show(ex.Message); } }
private void SetRegDisableSwipeEdgeMachine(bool isChecked) { RegistryKey key = RegPath.GetCreatePath(RegSwipeEdge, 1, true); if (isChecked) { key.SetValue(swipeRegValue, 0, RegistryValueKind.DWord); } else { key.DeleteValue(swipeRegValue); } key.Close(); }