Пример #1
0
 private void PrinterQueueLoop()
 {
     try
     {
         NodeFaceCheck faceCheck = (NodeFaceCheck)GetNodeByID("6001");
         if (faceCheck != null)
         {
             faceCheck.PrinterListProcess();
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
        public int GetPrintListLen()
        {
            NodeFaceCheck faceNode = GetNodeByID("6001") as NodeFaceCheck;

            return(faceNode.PrintList.Count());
        }