private void miFollowOffset_Click(object sender, EventArgs e) { var cell = (StructCell)_structGridView.SelectedRows[0].DataBoundItem; IConvertible value = cell.GetValue(); long offset = value.ToInt64(CultureInfo.CurrentCulture); _hexDump.SelectBytes(offset, 1); }
private void _structGridView_SelectionChanged(object sender, EventArgs e) { if (_structGridView.SelectedRows.Count > 0) { var cell = (StructCell)_structGridView.SelectedRows[0].DataBoundItem; int offset = cell.Offset; if (offset >= 0) { int dataSize = cell.GetDataSize((StructInstance)_activeInstance); if (dataSize <= 0) { dataSize = 1; } _hexDump.SelectBytes(offset, dataSize); } if (CellSelected != null) { CellSelected(this, new CellSelectedEventArgs(cell)); } } }