Exemple #1
0
        public FileController Get(string fileName)
        {
            fileName = GetAbsoluteFileName(fileName);

            FileController c = Find(fileName);

            if (c != null)
            {
                // Already in the system.
                return(c);
            }

            FileInfo info = new FileInfo(fileName);

            string ext = info.Extension.ToUpper();

            if (ext == ".BIG")
            {
                c = new BIGFileController(this, fileName);
            }
            else if (ext == ".BIN")
            {
                if (info.Name.ToUpper() == "NAMES.BIN")
                {
                    c = new NamesBINController(this, fileName);
                }
                else
                {
                    c = new BINFileController(this, fileName);
                }
            }
            else if (ext == ".STB")
            {
                c = new BBBFileController(
                    this, new FableMod.STB.STBFile(), fileName);
            }
            else if (ext == ".WAD")
            {
                c = new BBBFileController(
                    this, new FableMod.BBB.BBBFile(), fileName);
            }
            else if (ext == ".WLD")
            {
                c = new WLDFileController(this, fileName);
            }

            if (c != null)
            {
                myFiles.Add(c);
            }

            return(c);
        }
Exemple #2
0
        private FileController LoadFile(string fileName)
        {
            List <Processor> processors = new List <Processor>();

            FileController c = myFileDB.Get(fileName);

            c.LoadProcess(processors, true);

            FormProcess form = new FormProcess(processors);

            form.ShowDialog();

            form.Dispose();

            return(c);
        }
Exemple #3
0
        public FileController AutoLoad(string fileName)
        {
            FileController c = Get(fileName);

            if (c != null && !c.FileLoaded)
            {
                List <Processor> processors = new List <Processor>();

                c.LoadProcess(processors);

                FormProcess form = new FormProcess(processors);

                form.ShowDialog();

                form.Dispose();
            }

            return(c);
        }
 public FileProcessor(FileController c, string fileName)
 {
     myController = c;
     myMode       = FileProcessorMode.SaveFile;
     myFileName   = fileName;
 }
 public FileProcessor(FileController c,
                      FileProcessorMode mode)
 {
     myController = c;
     myMode       = mode;
 }