Ejemplo n.º 1
0
        public virtual unsafe System.Windows.Forms.Control GetControl()
        {
            afh.Application.Log l = UI.TreeNode.ShareLog;
            l.Clear();
            l.Lock();
            l.WriteLine("Binary dump of first 512 bytes:");
            fixed(byte *img = &this.file.image[0])
            {
                byte *table = img + (uint)entry.offset;
                byte *end   = table + System.Math.Min((uint)entry.length, 512u);

                for (int i = 1; table < end; table++, i++)
                {
                    l.AppendText(table->ToString("X2"));
                    if (i >= 16)
                    {
                        i = 0;
                        l.AppendText("\r\n");
                    }
                    else
                    {
                        l.AppendText(" ");
                    }
                }
            }

            l.Unlock();
            return(UI.TreeNode.ShareTxtBox);
        }