public void CreateRegistrySubKey() { AddRegistryEntryDialDialog dialog = new AddRegistryEntryDialDialog(this.RegistryTreeView.SelectedNode.FullPath); dialog.ShowDialog(); string registryKeyName = dialog.RegistryKeyName; RegistryKey currentRegistryKey = GetRegistryKey(this.RegistryTreeView.SelectedNode.FullPath); RegistryTreeView.BeginUpdate(); RegistryKey rg = currentRegistryKey.CreateSubKey(registryKeyName, RegistryKeyPermissionCheck.ReadWriteSubTree); selectedTreeNode.Nodes.Add(registryKeyName); RegistryTreeView.Refresh(); RegistryTreeView.EndUpdate(); }
public void AddRegistryEntry() { AddRegistryEntryDialDialog dialog = new AddRegistryEntryDialDialog(this.RegistryTreeView.SelectedNode.FullPath); dialog.ShowDialog(); string registryKeyName = dialog.RegistryKeyName; object registryKeyValue = dialog.RegistryKeyValue; object registryKeyType = dialog.RegistryKeyType; RegistryKey addMultibytestring = GetRegistryKey(this.RegistryTreeView.SelectedNode.FullPath); addMultibytestring.SetValue(registryKeyName, registryKeyValue, (RegistryValueKind)registryKeyType); DataRow dataRow = dataTable.NewRow(); dataRow[0] = registryKeyName; dataRow[1] = registryKeyType; dataRow[2] = registryKeyValue; dataTable.Rows.Add(dataRow); }