private void valuePicker1_OnSelectedEntry(object sender, Registry.Entry entry, int index) { int offset; if (entry != null) { offset = entry.StartOffset; } else { offset = -1; } toolStripLabelEntryIndex.Text = "Entry " + index.ToString("X03"); toolStripLabelEntryOffset.Text = "Offset " + offset.ToString("X05"); }
private void valuePicker1_OnSelectedValue(object sender, Registry.Value value) { string str; switch (value.CurrentType) { case Registry.Value.Type.Registry: str = value.ValueRegistry.ToString(); break; case Registry.Value.Type.Integer: str = value.ValueInteger.ToString(); break; case Registry.Value.Type.String: str = value.ValueString; break; case Registry.Value.Type.Data: str = ""; for (int i = 0; i < value.ValueData.Length; i++) str += value.ValueData[i].ToString("X02"); break; default: str = "UNK.TYPE " + ((int)value.CurrentType).ToString("X02"); break; } textBox1.Text = str; toolStripLabelValueIndex.Text = "Value " + value.Index; toolStripLabelValueType.Text = "Type " + ((int)value.CurrentType).ToString("X02"); }