Esempio n. 1
0
        public HexEditor(byte[] buffer)
        {
            Shown += HexEditor_Shown;
            InitializeComponent();

            hexEditor = new HexEditBox();
            hexEditor.InitializeComponent();
            hexEditor.Dock = DockStyle.Fill;
            hexEditor.Font = new Font(hexEditor.Font.FontFamily, 12.0F);
            Controls.Add(hexEditor);

            input = buffer;
        }
Esempio n. 2
0
        private void SetupHexBox(HexEditBox hexEditBox1)
        {
            hexEditBox1.BackColor    = System.Drawing.SystemColors.Window;
            hexEditBox1.BorderStyle  = System.Windows.Forms.BorderStyle.Fixed3D;
            hexEditBox1.BytesPerLine = 16;
            hexEditBox1.Font         = new System.Drawing.Font("Courier New", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

            hexEditBox1.SetData(ParentFile.GetFileData());
            hexEditBox1.AllowEdit        = false;
            hexEditBox1.OffsetBytes      = 4;
            hexEditBox1.ShowOffsetPrefix = true;
            hexEditBox1.BaseOffset       = Offset;
        }
Esempio n. 3
0
        public void ShowControl(Panel Parent)
        {
            Parent.FindForm().SuspendLayout();

            EditControl = new HexEditBox();
            SetupHexBox((HexEditBox)EditControl);

            EditControl.Parent = Parent;

            Parent.ClientSize = EditControl.Size;
            EditControl.Dock = DockStyle.Fill;

            Parent.Visible = true;

            Parent.FindForm().ResumeLayout();
        }
Esempio n. 4
0
        private void SetupHexBox(HexEditBox hexEditBox1)
        {
            hexEditBox1.BackColor = System.Drawing.SystemColors.Window;
            hexEditBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            hexEditBox1.BytesPerLine = 16;
            hexEditBox1.Font = new System.Drawing.Font("Courier New", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));

            hexEditBox1.SetData(ParentFile.GetFileData());
            hexEditBox1.AllowEdit = false;
            hexEditBox1.OffsetBytes = 4;
            hexEditBox1.ShowOffsetPrefix = true;
            hexEditBox1.BaseOffset = Offset;
        }