Example #1
0
        private void lvKeyDisplay_DoubleClick(object sender, EventArgs e)
        {
            TreeNode selectedNode = tvRegistryNavigator.SelectedNode;

            if (selectedNode == null)
            {
                return;
            }
            if (lvKeyDisplay.SelectedItems.Count < 1)
            {
                return;
            }
            if (lvKeyDisplay.View == View.List)
            {
                return;
            }
            string key = lvKeyDisplay.SelectedItems[0].Text;

            using (editRegistryKeyForm erkf = new editRegistryKeyForm(key))
            {
                if (erkf.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, key, erkf.NewValue);
                    data.LoadedValues = false;
                    LoadValues(selectedNode);
                }
            }
        }
Example #2
0
 private void lvKeyDisplay_DoubleClick(object sender, EventArgs e)
 {
     TreeNode selectedNode = tvRegistryNavigator.SelectedNode;
     if (selectedNode == null)
         return;
     if (lvKeyDisplay.SelectedItems.Count < 1)
         return;
     if (lvKeyDisplay.View == View.List)
         return;
     string key = lvKeyDisplay.SelectedItems[0].Text;
     using (editRegistryKeyForm erkf = new editRegistryKeyForm(key))
     {
         if(erkf.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, key, erkf.NewValue);
             data.LoadedValues = false;
             LoadValues(selectedNode);
         }
     }
 }