private int AFirst(GoObject obj, GoObject a, GoObject b)
            {
                if (obj == a)
                {
                    return(-1);
                }
                if (obj == b)
                {
                    return(1);
                }
                GoGroup goGroup = obj as GoGroup;

                if (goGroup != null)
                {
                    foreach (GoObject item in goGroup.GetEnumerator())
                    {
                        int num = AFirst(item, a, b);
                        if (num != 0)
                        {
                            return(num);
                        }
                    }
                }
                return(0);
            }
Beispiel #2
0
        internal static GoText FindLabel(GoObject obj)
        {
            GoText goText = obj as GoText;

            if (goText != null)
            {
                return(goText);
            }
            GoGroup goGroup = obj as GoGroup;

            if (goGroup != null)
            {
                foreach (GoObject item in goGroup.GetEnumerator())
                {
                    GoText goText2 = FindLabel(item);
                    if (goText2 != null)
                    {
                        return(goText2);
                    }
                }
            }
            return(null);
        }
Beispiel #3
0
        private void findAllAux <T>(GoObject obj, Search s, List <T> items)
        {
            IGoPort goPort = obj as IGoPort;

            if (goPort != null)
            {
                if ((s & Search.Ports) != 0)
                {
                    addItem(items, (T)goPort);
                }
                GoPort goPort2 = goPort as GoPort;
                if (goPort2 != null)
                {
                    foreach (IGoLink link in goPort2.Links)
                    {
                        considerLink(link, goPort, s, items);
                    }
                }
                else
                {
                    foreach (IGoLink link2 in goPort.Links)
                    {
                        considerLink(link2, goPort, s, items);
                    }
                }
            }
            GoGroup goGroup = obj as GoGroup;

            if (goGroup != null)
            {
                foreach (GoObject item in goGroup.GetEnumerator())
                {
                    findAllAux(item, s, items);
                }
            }
        }