public RegistryEditorControl() { try { InitializeComponent(); if (!DesignMode) { _localMachine32 = new UtilsRegistry(Registry.LocalMachine, @"Software\Microsoft\Office"); _currentUser32 = new UtilsRegistry(Registry.CurrentUser, @"Software\Microsoft\Office"); if (Is64Bit) { _localMachine64 = new UtilsRegistry(Registry.LocalMachine, @"Software\Wow6432Node\Microsoft\Office"); _currentUser64 = new UtilsRegistry(Registry.CurrentUser, @"Software\Wow6432Node\Microsoft\Office"); } _userIsAdmin = IsAdministrator(); pictureBoxNoAdminHint.Visible = !_userIsAdmin; labelNoAdminHint.Visible = !_userIsAdmin; labelNoAdminHintIcon.Visible = !_userIsAdmin; } } catch (Exception exception) { ErrorForm errorForm = new ErrorForm(exception, ErrorCategory.NonCritical, _currentLanguageID); errorForm.ShowDialog(this); } }
internal UtilsRegistryKey(UtilsRegistry root, string fullPath) { _root = root; _path = fullPath; _innerKey = _root.HiveKey.OpenSubKey(fullPath); _innerKey.Close(); }
internal UtilsRegistryKey(UtilsRegistry root, RegistryKey innerKey, string path) { _root = root; _innerKey = innerKey; _path = path; }