/// <summary> /// 右侧ListView双击事件 /// </summary> internal static void OnListViewDoubleClickAction() { if (MainForm.main.listView_Registry.SelectedItems.Count.Equals(1)) { cRegValue value = (cRegValue)MainForm.main.listView_Registry.SelectedItems[0].SubItems[2].Tag; if (value.ParentKey != null) { Registry_ValueEditor editor = null; switch (value.Kind) { case RegistryValueKind.String: case RegistryValueKind.ExpandString: editor = new StringEditor(value); break; case RegistryValueKind.Binary: editor = new BinaryEditor(value); break; case RegistryValueKind.DWord: case RegistryValueKind.QWord: editor = new DWordQWordEditor(value); break; case RegistryValueKind.MultiString: editor = new MultiStringEditor(value); break; case RegistryValueKind.Unknown: case RegistryValueKind.None: break; default: break; } if (editor != null) { if (editor.ShowDialog(MainForm.main) == DialogResult.OK) { RefreshValues(); } } } } }
private void OnValueEditAction() { if (lstValues.SelectedItems.Count == 1) { RegValue value = (RegValue)lstValues.SelectedItems[0].SubItems[2].Tag; if (value.ParentKey != null) { ValueEditor editor = null; switch (value.Kind) { case RegistryValueKind.Binary: editor = new BinaryEditor(value); break; case RegistryValueKind.MultiString: editor = new MultiStringEditor(value); break; case RegistryValueKind.DWord: case RegistryValueKind.QWord: editor = new DWordEditor(value); break; case RegistryValueKind.String: case RegistryValueKind.ExpandString: editor = new StringEditor(value); break; case RegistryValueKind.Unknown: default: break; } if (editor != null) { if (editor.ShowDialog(this) == DialogResult.OK) { RefreshValues(); } } } } }