public void loadCVMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ISOFile != null)
            {
                RandFunctions rn = new RandFunctions();
                List<string> files = rn.LoadCVM(ISOFile, treeView1.SelectedNode.Text);
                PopulateTreeView(files, treeView1.SelectedNode);
            }

            else { MessageBox.Show("Sorry!, ISO Stream is null! ", "Error"); }
        }
        private void extractToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RandFunctions rn = new RandFunctions();
            SaveFileDialog sfd = new SaveFileDialog();
            sfd.FileName = treeView1.SelectedNode.Text;
            if (sfd.ShowDialog() != DialogResult.OK)
                return;

            string savePath = sfd.FileName;
            string fullPath = treeView1.SelectedNode.FullPath;
            fullPath = fullPath.Remove(0, 1);
            int index = fullPath.IndexOf(".CVM");

            if (index > 0 && !treeView1.SelectedNode.Text.Contains(".CVM"))
            {
                string root = fullPath.Substring(0, fullPath.IndexOf("\\"));
                string path = fullPath.Substring(fullPath.IndexOf("\\") + 1);

                CDReader cd = new CDReader(ISOFile, true);
                Stream cvmOpen = cd.OpenFile(root, FileMode.Open);
                cvmOpen.Seek(0x1800, SeekOrigin.Begin);
                using (MemoryStream ms = new MemoryStream())
                {
                    cvmOpen.CopyTo(ms, (int)cvmOpen.Length);
                    CDReader cvm = new CDReader(ms, true);
                    Stream fileCVM = cvm.OpenFile(path, FileMode.Open);
                    rn.ExtractFile(savePath, fileCVM);
                    MessageBox.Show(Path.GetFileName(savePath) + " saved to file!", "PersonaISOEditor");
                    cvmOpen.Dispose(); cvmOpen.Close();
                }
            }

            else
            {
                CDReader cd = new CDReader(ISOFile, true);
                Stream file = cd.OpenFile(fullPath, FileMode.Open);
                rn.ExtractFile(savePath, file);
                MessageBox.Show(Path.GetFileName(savePath) + " saved to file!", "PersonaISOEditor");
            }
        }
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog sv = new SaveFileDialog();
            sv.Filter = "ISO Image|*.iso";
            if (sv.ShowDialog() != DialogResult.OK)
                return;

            RandFunctions rn = new RandFunctions();
            rn.BuildISO(ISOFile, sv.FileName);
        }