Exemple #1
0
        public string Pack(ref sFolder unpacked, sFile file)
        {
            if (file.name.ToUpper().EndsWith("ROMFILE.BIN"))
            {
                String packFile = pluginHost.Get_TempFile();
                if (File.Exists(packFile))
                {
                    File.Delete(packFile);
                }

                PACK.Pack(packFile, ref unpacked);
                return(packFile);
            }

            return(null);
        }
Exemple #2
0
        public sFolder Unpack(sFile file)
        {
            if (file.name.ToUpper().EndsWith("ROMFILE.BIN"))
            {
                System.Threading.Thread waiting = new System.Threading.Thread(ThreadWait);
                String lang = "";
                try
                {
                    System.Xml.Linq.XElement xml = System.Xml.Linq.XElement.Load(Application.StartupPath + System.IO.Path.DirectorySeparatorChar +
                                                                                 "Plugins" + System.IO.Path.DirectorySeparatorChar + "EDGEWORTHLang.xml");
                    lang = xml.Element(pluginHost.Get_Language()).Element("S02").Value;
                }
                catch { throw new NotSupportedException("There was an error reading the language file"); }
                waiting.Start(lang);

                sFolder desc = PACK.Unpack(file.path, pluginHost);

                waiting.Abort();
                return(desc);
            }

            return(new sFolder());
        }