Ejemplo n.º 1
0
        public override void NeIzvrsi()
        {
            cn.x = x;
            cn.y = y;

            foreach (Substation s in Singleton.Instance().Substations)
            {
                foreach (ConnectivityNode conNode in s.connectivityNodes)
                {
                    if (conNode.mRID.Equals(cn.mRID))
                    {
                        for (int i = 0; i < s.connectivityNodes.Count; i++)
                        {
                            if (!cn.mRID.Equals(s.connectivityNodes[i].mRID))
                            {
                                if (Kanvas.Check(cn.x, cn.y, s.connectivityNodes[i].x, s.connectivityNodes[i].y, 55))
                                {
                                    s.connectivityNodes[i].x = -1;
                                    s.connectivityNodes[i].y = -1;
                                }
                            }
                        }

                        break;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void NeIzvrsi()
        {
            s.x = x;
            s.y = y;

            foreach (Substation sub in Singleton.Instance().Substations)
            {
                if (!s.mRID.Equals(sub.mRID))
                {
                    if (Kanvas.Check(s.x, s.y, sub.x, sub.y, 180))
                    {
                        sub.x = -1;
                        sub.y = -1;
                    }
                }
            }
        }