Ejemplo n.º 1
0
        public void OpenILP(string ilpPath)
        {
            ClearILP();
            ILPLocation = ilpPath;

            XmlDocument    xDoc     = XMLUtility.ReadFromFile(ilpPath);
            XmlNode        BaseNode = null;
            bool           Match    = false;
            NameCompressor nc       = NameCompressor.Instance;

            foreach (XmlNode xnode in xDoc.ChildNodes)
            {
                if (xnode.Name == nc.GetValComp(SST.ILPTable))
                {
                    Match = true; NameCompressor.Compress = true;
                }
                else if (xnode.Name == nc.GetValUnComp(SST.ILPTable))
                {
                    Match = true; NameCompressor.Compress = false;
                }
                if (Match)
                {
                    BaseNode = xnode; break;
                }
            }
            if (Match)
            {
                Load(BaseNode);
            }
            else
            {
                Log.Write(Log.Level.Error, "No PatchTable found!");
            }

            OnILPFileLoaded?.Invoke(this);
        }