public void SimSetAirlossCheckRe(string nodeName, string re) { if (nodeName != "气密检查1" && nodeName != "气密检查2" && nodeName != "气密检查3") { return; } CtlNodeBaseModel node = GetNode(nodeName); NodeAirlossCheck airlossNode = node as NodeAirlossCheck; (airlossNode.AirDetectRW as AirDetectRWSim).DetectRe = re; }
private bool ParseCtlnodes(XElement CtlnodeRoot, ref string reStr) { if (CtlnodeRoot == null) { reStr = "系统配置文件错误,不存在CtlNodes节点"; return(false); } try { IEnumerable <XElement> nodeXEList = from el in CtlnodeRoot.Elements() where el.Name == "Node" select el; foreach (XElement el in nodeXEList) { string className = (string)el.Attribute("className"); CtlNodeBaseModel ctlNode = null; switch (className) { case "LineNodes.ProductInput": { ctlNode = new NodeProductInput(); break; } case "LineNodes.NodeAirlossCheck": { ctlNode = new NodeAirlossCheck(); break; } case "LineNodes.NodeFireZero": { ctlNode = new NodeFireZero(); break; } case "LineNodes.NodeFireTryingA": { ctlNode = new NodeFireTryingA(); break; } case "LineNodes.NodeFireTryingB": { ctlNode = new NodeFireTryingB(); break; } case "LineNodes.NodeFaceCheck": { ctlNode = new NodeFaceCheck(); break; } case "LineNodes.NodePack": { ctlNode = new NodePack(); break; } case "LineNodes.NodeRobotPallet": { ctlNode = new NodeRobotPallet(); break; } default: break; } if (ctlNode != null) { if (!ctlNode.BuildCfg(el, ref reStr)) { return(false); } //Console.WriteLine(ctlNode.NodeName + ",ID:" + ctlNode.NodeID + "创建成功!"); this.nodeList.Add(ctlNode); } } } catch (Exception ex) { reStr = ex.ToString(); return(false); } return(true); }