Clears the text in textBox1, clears the items in listView1, clears the nodes in treeView1, and then starts the asynchronous operation StartAdd().
Parameters
sender
The object that raised the event.
e
The event data.
This method clears the text in textBox1, the items in listView1, and the nodes in treeView1 to prepare for the asynchronous operation StartAdd(). It then awaits the completion of StartAdd() to continue with further operations.
Deletes a registry key at the specified path and key and returns a boolean indicating whether the operation was successful.
Parameters
path
The path of the registry key to be deleted.
key
The name of the registry key to be deleted.
Returns
True if the registry key was successfully deleted; otherwise, false.
This method sends a delete operation request to the server using the specified path and key. If the operation is successful, it returns true; otherwise, it returns false.
Deletes a registry subkey and returns a boolean indicating whether the operation was successful.
Parameters
path
The path of the registry subkey to be deleted.
Returns
True if the registry subkey was successfully deleted; otherwise, false.
This method sends a delete opcode followed by the UTF-8 encoded path to the registry subkey to the client using asynchronous operations. It then awaits the response from the client and returns a boolean indicating whether the deletion operation was successful.
Deserializes the byte array data into a RegInfo object.
Parameters
data
The byte array containing the serialized RegInfo data.
Returns
The deserialized RegInfo object.
This method deserializes the byte array data into a RegInfo object by reading the data using a BinaryReader and populating the RegInfo properties based on the data read. It handles various types of registry values such as REG_SZ, REG_EXPAND_SZ, REG_BINARY, REG_DWORD, REG_MULTI_SZ, and REG_QWORD, and populates the RegInfo object with the corresponding values.
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
This method releases the unmanaged resources used by the component and optionally releases the managed resources. If disposing is true, this method releases all resources held by any managed objects that this Component references. This method is called by the public Dispose() method and the Finalize method.
Retrieves registration information for the specified path.
Parameters
path
The path for which registration information is to be retrieved.
Returns
The registration information for the specified path .
Exceptions
ArgumentNullException
Thrown when the path is null.
InvalidOperationException
Thrown when the operation is invalid for the current state of the object.
This method sends the specified path to the client using the SendAsync method and then receives a response. If the response indicates success, it deserializes the received data to obtain the registration information. If the response indicates failure, it returns null.
Asynchronously starts the process of adding registry information to the tree view.
This method asynchronously retrieves registry information for "HKLM" and "HKCU" hives using the GetRegInfo method, and then populates the tree view with the retrieved information. The retrieved information for each hive is added as a new TreeNode to the tree view, and then subkeys under each hive are added as child nodes to the respective hive nodes. The tree view is updated once all the nodes are added.
Executes the specified action when the given node is disconnected.
Parameters
node
The node to be checked for disconnection.
This method checks if the provided node is the same as the client node, and if it is not disposed. If both conditions are met, it invokes the specified action to close the connection.
Updates the listView1 based on the selected node in treeView1.
Parameters
sender
The object that raised the event.
e
The event data.
This method updates the listView1 based on the selected node in treeView1. It clears the listView1, retrieves the RegInfo associated with the selected node, and populates the listView1 with the values from the RegInfo. The method handles different types of registry values and displays them accordingly in the listView1.
Handles the BeforeExpand event of the treeView1 control.
Parameters
sender
The source of the event.
e
A TreeViewCancelEventArgs that contains the event data.
This method asynchronously retrieves registry information for each node being expanded in the treeView1 control. It sets the retrieved registry information as the Tag property of each node. If the retrieved registry information is null, the method continues to the next node. For each subkey in the retrieved registry information, a new TreeNode is added to the node being expanded, and the subkey is set as the Tag property of the new TreeNode.
Handles the event when a node in the tree view is clicked with the mouse.
Parameters
sender
The source of the event.
e
A TreeNodeMouseClickEventArgs that contains the event data.
This method checks if the right mouse button is clicked and, if so, creates a context menu with options related to the clicked node. If an exception occurs during the process, a message box displaying "something went wrong..." is shown.