public void OpenFile(string fileName)
        {
            FileStream fstream = new FileStream(fileName, FileMode.Open);
            BinaryReader br = new BinaryReader(fstream);

            _fileName = fileName;

            //int str_len = 0;
            int size = 0;
            //char[] buffer = new char[512];
            //string ansi_buffer = string.Empty;

            // Amount of HGF Files
            size = br.ReadInt32();

            // Load ALL HGF Files
            for (int i = 0; i < size; i++)
            {
                // Load the associated HGF File info
                HGFFile hgfFile = new HGFFile();
                hgfFile.LoadFromProject(br);
                _hgfFiles.Add(hgfFile);
            }

            //Amount of HSF Files
            size = br.ReadInt32();

            // Load ALL HSF Files
            for (int i = 0; i < size; i++)
            {
                // Load the associated HSF file info
                HSFFile hsfFile = new HSFFile();
                hsfFile.LoadFromProject(br);
                _hsfFiles.Add(hsfFile);
            }

            // Amount of HFF Files
            size = br.ReadInt32();

            // Load ALL HFF Files
            for (int i = 0; i < size; i++)
            {
                HFFFile hffFile = new HFFFile();
                hffFile.LoadFromProject(br);
                _hffFiles.Add(hffFile);
            }

            // Amount of HLF / HTF Files
            size = br.ReadInt32();

            // Load ALL HLF / HTF Files
            for (int i = 0; i < size; i++)
            {
                Level level = new Level();
                level.LoadFromProject(br);
                _hlfFiles.Add(level);
            }

            // Close the Binary Reader
            br.Close();
        }
Beispiel #2
0
        public void OpenFile(string fileName)
        {
            FileStream   fstream = new FileStream(fileName, FileMode.Open);
            BinaryReader br      = new BinaryReader(fstream);

            _fileName = fileName;

            //int str_len = 0;
            int size = 0;

            //char[] buffer = new char[512];
            //string ansi_buffer = string.Empty;

            // Amount of HGF Files
            size = br.ReadInt32();

            // Load ALL HGF Files
            for (int i = 0; i < size; i++)
            {
                // Load the associated HGF File info
                HGFFile hgfFile = new HGFFile();
                hgfFile.LoadFromProject(br);
                _hgfFiles.Add(hgfFile);
            }

            //Amount of HSF Files
            size = br.ReadInt32();

            // Load ALL HSF Files
            for (int i = 0; i < size; i++)
            {
                // Load the associated HSF file info
                HSFFile hsfFile = new HSFFile();
                hsfFile.LoadFromProject(br);
                _hsfFiles.Add(hsfFile);
            }

            // Amount of HFF Files
            size = br.ReadInt32();

            // Load ALL HFF Files
            for (int i = 0; i < size; i++)
            {
                HFFFile hffFile = new HFFFile();
                hffFile.LoadFromProject(br);
                _hffFiles.Add(hffFile);
            }

            // Amount of HLF / HTF Files
            size = br.ReadInt32();

            // Load ALL HLF / HTF Files
            for (int i = 0; i < size; i++)
            {
                Level level = new Level();
                level.LoadFromProject(br);
                _hlfFiles.Add(level);
            }

            // Close the Binary Reader
            br.Close();
        }