Exemple #1
0
        public RegistryKeyWrapper CreateSubKey(string subkey)
        {
            var createdSubKey = new RegistryKeyWrapper();
            if (RegistryKey != null)
                createdSubKey.RegistryKey = this.RegistryKey.CreateSubKey(subkey);

            createdSubKey.RegPath = this.RegPath;
            return createdSubKey;
        }
Exemple #2
0
        public RegistryKeyWrapper CreateSubKey(string subkey)
        {
            var createdSubKey = new RegistryKeyWrapper();

            if (RegistryKey != null)
            {
                createdSubKey.RegistryKey = this.RegistryKey.CreateSubKey(subkey);
            }

            createdSubKey.RegPath = this.RegPath;
            return(createdSubKey);
        }
Exemple #3
0
        public RegistryKeyWrapper OpenSubKey(string name, bool writable)
        {
            var openedSubKey = new RegistryKeyWrapper();

            if (RegistryKey != null)
            {
                openedSubKey.RegistryKey = this.RegistryKey.OpenSubKey(name, writable);
            }

            openedSubKey.RegPath = string.Format(@"{0}\{1}", this.RegPath, name);
            return(openedSubKey);
        }
Exemple #4
0
        protected virtual RegistryKeyWrapper getAppSettingsRegistrykey()
        {
            if (m_RegKeyWrapper == null)
            {
                m_RegKeyWrapper = new RegistryKeyWrapper();

                RegistryKeyWrapper hkcu = getHKCU();
                RegistryKeyWrapper key = hkcu.OpenSubKey("Software", true);
                key.CreateSubKey(m_AppRegistryBranch);
                key = key.OpenSubKey(m_AppRegistryBranch, true);

                key.CreateSubKey(m_AppVersion);
                key = key.OpenSubKey(m_AppVersion, true);

                m_RegKeyWrapper = key;
            }

            return m_RegKeyWrapper;
        }
Exemple #5
0
        protected virtual RegistryKeyWrapper getAppSettingsRegistrykey()
        {
            if (m_RegKeyWrapper == null)
            {
                m_RegKeyWrapper = new RegistryKeyWrapper();

                RegistryKeyWrapper hkcu = getHKCU();
                RegistryKeyWrapper key  = hkcu.OpenSubKey("Software", true);
                key.CreateSubKey(m_AppRegistryBranch);
                key = key.OpenSubKey(m_AppRegistryBranch, true);

                key.CreateSubKey(m_AppVersion);
                key = key.OpenSubKey(m_AppVersion, true);

                m_RegKeyWrapper = key;
            }

            return(m_RegKeyWrapper);
        }
Exemple #6
0
        public RegistryKeyWrapper OpenSubKey(string name, bool writable)
        {
            var openedSubKey = new RegistryKeyWrapper();
            if (RegistryKey != null)
                openedSubKey.RegistryKey = this.RegistryKey.OpenSubKey(name, writable);

            openedSubKey.RegPath = string.Format(@"{0}\{1}", this.RegPath, name);
            return openedSubKey;
        }
Exemple #7
0
 protected virtual void saveSingleSetting(RegistryKeyWrapper regKeyWrapper, string settingId, object value)
 {
     regKeyWrapper.RegistryKey.SetValue(settingId, value);
 }
Exemple #8
0
 protected virtual object loadSingleSetting(RegistryKeyWrapper regKeyWrapper, string settingId, object defaultValue)
 {
     return regKeyWrapper.RegistryKey.GetValue(settingId, defaultValue);
 }
Exemple #9
0
 protected virtual object loadSingleSetting(RegistryKeyWrapper regKeyWrapper, string settingId, object defaultValue)
 {
     return(regKeyWrapper.RegistryKey.GetValue(settingId, defaultValue));
 }
Exemple #10
0
 protected virtual void saveSingleSetting(RegistryKeyWrapper regKeyWrapper, string settingId, object value)
 {
     regKeyWrapper.RegistryKey.SetValue(settingId, value);
 }