private void dataTypeComboBox_SelectedIndexChanged(object sender, EventArgs e) { marker.Type = DataType.FromString(dataTypeComboBox.Text); sizeNumericUpDown.Value = marker.Type.NumBytes; sizeNumericUpDown.Enabled = marker.Type.VariableNumBytes; valueTextBox.Text = marker.Type.DecodeToString(hexview.GetDataAt(marker.Address)); }
public MarkerEditor(DataMarker marker, HexView hexview) { InitializeComponent(); this.marker = marker; this.hexview = hexview; markerAtTextBox.Text = DataType.AddressToString(marker.Address); noteTextBox.Text = marker.Note; dataTypeComboBox.Items.AddRange(DataType.GetKnownDataTypes().ToArray()); dataTypeComboBox.SelectedIndex = dataTypeComboBox.FindString(marker.Type.Name); sizeNumericUpDown.Value = marker.NumBytes; sizeNumericUpDown.Enabled = marker.Type.VariableNumBytes; valueTextBox.Text = marker.Type.DecodeToString(hexview.GetDataAt(marker.Address)); }