Exemplo n.º 1
0
 public object Clone()
 {
     FrameNode newNode = new FrameNode(this.nodeId, this.anchor, this.belongedFrameId);
     return newNode;
 }
Exemplo n.º 2
0
        //找到非origId的框外自由节点最多的框
        Frame FindMostFreeNodeFrame(FrameNode origNode, HashSet<Frame> lframes)
        {
            Frame mframe = null;
            int mfncount = -1;
            foreach (Frame frame in lframes)
            {
                if (frame.frameId == origNode.belongedFrameId)
                    continue;

                if (mframe == null)
                {
                    mframe = frame;
                    mfncount = GetFreeNodes(frame);
                    continue;
                }
                int fncount = GetFreeNodes(frame);
                if (fncount > mfncount)
                {
                    mframe = frame;
                    mfncount = fncount;
                }
            }
            return mframe;
        }