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; }
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"); } }
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; }