Example #1
0
        private bool Deserialize()
        {
            bool res = true;

            try
            {
                Stream          fstream   = new FileStream(saveLoc, FileMode.Open, FileAccess.Read);
                BinaryFormatter binFormat = new BinaryFormatter();
                mFs = (MyFileSystem)binFormat.Deserialize(fstream);
                MyFileSystem.SetInstance(mFs);
                MyDiskManager.SetInstance(mFs.DiskManager);
                fstream.Close();
            }
            catch (FileNotFoundException e)
            {
                res = false;
            }
            return(res);
        }