mirror of
https://github.com/claunia/libexeinfo.git
synced 2025-12-16 19:14:24 +00:00
Add gui panel to hex dump unknown ne resources by default.
This commit is contained in:
29
exeinfogui/PanelHexDump.xeto.cs
Normal file
29
exeinfogui/PanelHexDump.xeto.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Net.Sockets;
|
||||
using Eto.Forms;
|
||||
using Eto.Drawing;
|
||||
using Eto.Serialization.Xaml;
|
||||
|
||||
namespace exeinfogui
|
||||
{
|
||||
public class PanelHexDump : Panel
|
||||
{
|
||||
TextArea txtHexDump;
|
||||
public PanelHexDump()
|
||||
{
|
||||
XamlReader.Load(this);
|
||||
}
|
||||
|
||||
public void Update(byte[] data)
|
||||
{
|
||||
txtHexDump.Text = "";
|
||||
for(long pos = 0; pos < data.LongLength; pos++)
|
||||
{
|
||||
if(pos > 0 && pos % 4 == 0) txtHexDump.Text += " ";
|
||||
txtHexDump.Text += $"{data[pos]:X2} ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user