private void CreateHexParts()
        {
            var columnNumber = 0;
            var lineNumber = 1;
            var hexLine = new HexPart(lineNumber);

            foreach (var currentByte in CurrentContent)
            {
                if(!HexParts.Contains(hexLine))
                    HexParts.Add(hexLine);

                var hexChar = new HexNumber();

                AppendHex(hexChar, currentByte);
                AppendText(hexChar, currentByte);

                hexLine.Numbers.Add(hexChar);
                columnNumber++;

                if (columnNumber == 16)
                {
                    lineNumber++;
                    columnNumber = 0;
                    hexLine = new HexPart(lineNumber);
                }
            }
        }
Example #2
0
        private void CreateHexParts()
        {
            var columnNumber = 0;
            var lineNumber   = 1;
            var hexLine      = new HexPart(lineNumber);

            foreach (var currentByte in SelectedMessage)
            {
                if (!HexParts.Contains(hexLine))
                {
                    HexParts.Add(hexLine);
                }

                var hexChar = new HexNumber();

                AppendHex(hexChar, currentByte);
                AppendText(hexChar, currentByte);

                hexLine.Numbers.Add(hexChar);
                columnNumber++;

                if (columnNumber == 16)
                {
                    lineNumber++;
                    columnNumber = 0;
                    hexLine      = new HexPart(lineNumber);
                }
            }
        }