private void RecomputeStrings() { using (new SuspendDrawing(this)) { addressTextBox.Text = DataType.AddressToString(target.Address); foreach (var dt in DataType.GetKnownDataTypes()) { var tb = Controls[dt.Name + "TextBox"] as TextBox; tb.Text = dt.DecodeToString(target); } } Refresh(); }
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)); }