Beispiel #1
0
        public SaveForm(NSE_Framework.Write write, byte[] Data, int Offset, int OrigonalLength)
        {
            InitializeComponent();

            if (Program.MainForm.Read.FileLength > 0x1000000)
            {
                TextBox1.MaxLength = 7;
            }


            if (Offset != -1)
            {
                TextBox1.Text = Offset.ToString("X2");
            }
            else
            {
                NSE_Framework.Find find = new NSE_Framework.Find(Program.MainForm.Filename);
                int f = find.FindFreeSpace(0, Data.Length);
                if (f != -1)
                {
                    TextBox1.Text = f.ToString("X2");
                }
            }
            Label3.Text = OrigonalLength.ToString();

            this.OrigonalOffset = Offset;
            this.Data           = Data;
            this.OrigonalLength = OrigonalLength;
            this.write          = write;
        }
Beispiel #2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            NSE_Framework.Find find = new NSE_Framework.Find(Program.MainForm.Filename);
            int f = find.FindFreeSpace(int.Parse(TextBox1.Text, System.Globalization.NumberStyles.HexNumber), Data.Length, Program.MainForm.SafetyRepointing);

            if (f != -1)
            {
                TextBox1.Text = f.ToString("X2");
            }
        }
Beispiel #3
0
        public InsertForm(NSE_Framework.Write write, byte[] Data)
        {
            InitializeComponent();

            if (Program.MainForm.Read.FileLength > 0x1000000)
            {
                TextBox1.MaxLength = 7;
            }

            NSE_Framework.Find find = new NSE_Framework.Find(Program.MainForm.Filename);
            TextBox1.Text = find.FindFreeSpace(0X800000, Data.Length, true).ToString("X2");
            Label3.Text   = Data.Length.ToString();

            this.Data  = Data;
            this.write = write;
        }