public MemoryCardControl(MemoryCard Card) { InitializeComponent(); this.Card = Card; HexBoxContent._useOffsetInsteadOfPage = false; if (Card.Pages[0].Length > 16) { HexBoxContent.BytesPerLine = 16; } else { HexBoxContent.BytesPerLine = Card.Pages[0].Length; } int x = lbHex.Location.X + 16 + (HexBoxContent.BytesPerLine * 21); lbASCII.Location = new Point(x, lbASCII.Location.Y); /* The content */ List <byte> content = new List <byte>(); /* P1 and P2 */ List <byte> addresses = new List <byte>(); for (int address = 0; address < Card.LastAddressRead; address++) { addresses.Add((byte)(address / 0x0100)); addresses.Add((byte)(address % 0x0100)); byte[] data = Card.GetData(address); for (int i = 0; i < data.Length; i++) { content.Add(data[i]); } } HexBoxContent.ByteProviderP1P2 = new DynamicByteProvider(addresses.ToArray()); HexBoxContent.ByteProvider = new DynamicByteProvider(content.ToArray()); }