Exemplo n.º 1
0
        public LDLBOBase CreateItem(string[] definition, string id)
        {
            LDLPointsNode result = new LDLPointsNode(id);

            LDLSwitchAndDimondFactoryWorker.PopulateItemText(definition, id, result);
            return(result);
        }
Exemplo n.º 2
0
        protected static void PopulateItemText(string[] definition, string id, LDLSandCBASE toPopulate)
        {
            int           definitionLineCount = definition.GetUpperBound(0);
            LDLPointsNode asPoints            = toPopulate as LDLPointsNode;

            for (int idx = 0; idx <= definitionLineCount; idx++)
            {
                if (!ParseGraphicPoint(definition[idx], toPopulate))
                {
                    if (definition[idx].Contains(normalPath))
                    {
                        toPopulate.NormalPath = new LDLTrackPair(definition[idx]);
                    }
                    else if (definition[idx].Contains(reversePath))
                    {
                        toPopulate.ReversePath = new LDLTrackPair(definition[idx]);
                    }
                    if (asPoints != null)
                    {
                        if (definition[idx].Contains(typeStr))
                        {
                            asPoints.PNType = ParseItem(definition[idx]);
                        }
                    }
                }

                if ((toPopulate.NormalPath != null) &&
                    (toPopulate.GraphicPoint != null) &&
                    (toPopulate.ReversePath != null)
                    )
                {
                    if (asPoints != null)
                    {
                        if (!string.IsNullOrEmpty(asPoints.PNType))
                        {
                            break;
                        }
                    }
                }
            }
        }