public void SaveButton() { byte[] saveData = _packFile.ToByteArray(); Crypt.Encrypt(saveData); FileStream fOut = new FileStream(_packFile.Directory + _packFile.NameWithoutExtension + ".new.idx", FileMode.Create); fOut.Write(saveData, 0, saveData.Length); fOut.Dispose(); }