コード例 #1
0
        private void OnUpdatePosition()
        {
            string content = $"Ln {ByteViewer.CurrentLine}\tCol {ByteViewer.CurrentPositionInLine}";

            if (ByteViewer.ByteProvider != null && ByteViewer.ByteProvider.Length > ByteViewer.SelectionStart)
            {
                content += $"\tAddress: {ByteViewer.SelectionStart.ToString("X8")}";
                byte current = ByteViewer.ByteProvider.ReadByte(ByteViewer.SelectionStart);
                content += $"\tBits of Byte {ByteViewer.SelectionStart} ({current.ToString()} || {"0x" + current.ToString("X2")}): {BytesConverter.ToBits(current)}";
            }

            content += $"\t{GetDisplayBytes(ByteViewer.ByteProvider.Length)}";

            ByteSizeStatusBarItem.Content = content;
        }