private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TreeNode selectedNode = tvRegistryNavigator.SelectedNode;

            if (selectedNode == null)
            {
                return;
            }
            if (lvKeyDisplay.View == View.List)
            {
                return;
            }
            using (addRegistryKeyForm arkf = new addRegistryKeyForm())
            {
                if (arkf.ShowDialog() == DialogResult.OK)
                {
                    RegistryKeyType  regKey = keyFromNode(GetRootNode(selectedNode));
                    RegistryNodeData data   = (RegistryNodeData)selectedNode.Tag;
                    Client.Send((byte)NetworkCommand.RegistryEdit, (byte)RegistryCommand.SetValue, (byte)regKey, data.Path, arkf.NewKey, arkf.NewValue);
                    data.LoadedValues = false;
                    LoadValues(selectedNode);
                }
            }
        }
Beispiel #2
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     TreeNode selectedNode = tvRegistryNavigator.SelectedNode;
     if (selectedNode == null) return;
     if (lvKeyDisplay.View == View.List) return;
     using (addRegistryKeyForm arkf = new addRegistryKeyForm())
     {
         if (arkf.ShowDialog() == DialogResult.OK)
         {
             RegistryKeyType regKey = keyFromNode(GetRootNode(selectedNode));
             RegistryNodeData data = (RegistryNodeData)selectedNode.Tag;
             Client.Send((byte)NetworkCommand.RegistryEdit, (byte)RegistryCommand.SetValue, (byte)regKey, data.Path, arkf.NewKey, arkf.NewValue);
             data.LoadedValues = false;
             LoadValues(selectedNode);
         }
     }
 }