示例#1
0
        public bool addAspenScript(string[] idStrings, XElement tableNode)
        {
            bool foundPhase = false;

            AspenScript script = new AspenScript(idStrings);

            bool success = script.parseTable(tableNode);

            if (!success)
            {
                Console.WriteLine("ERROR - parsing script table!");
                return(false);
            }
            Console.WriteLine("script text: \n{0}", script.ScriptText);
            foreach (var phase in phaseList)
            {
                if (idStrings[1].Equals(phase.Name))
                {
                    foundPhase = true;
                    phase.addAspenScript(script);
                    break;
                }
            }
            if (!foundPhase)
            {
                Console.WriteLine("ERROR - found OP but not Phase({0} for script!", idStrings[1]);
            }
            return(foundPhase);
        }
示例#2
0
 public void addAspenScript(AspenScript script)
 {
     aspenScriptList.Add(script);
 }