private void cryptToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog fd = new OpenFileDialog(); fd.Title = "Select a Script..."; fd.Filter = "All ExHIBIT Scripts File|*.rld"; if (fd.ShowDialog() != DialogResult.OK) { return; } var Key = new Form2(); if (Key.ShowDialog() != DialogResult.OK) { return; } var Script = System.IO.File.ReadAllBytes(fd.FileName); var RLDMan = new RLD(Script, Key.Key); RLDMan.XOR(ref Script); System.IO.File.WriteAllBytes(fd.FileName + ".crypt", Script); MessageBox.Show("Done!"); }