Example #1
0
        private void ribbonButton9_Click(object sender, EventArgs e)
        {
            uint pos = 2;

            //先把引用了pos位置的物体的引用设为null
            IEarthObject earthObject = m_earthRoot.getChild(pos);

            if (earthObject == null)
            {
                return;
            }

            if (earthObject.equal(imageSurfaceLayerA))
            {
                imageSurfaceLayerA = null;
            }
            else if (earthObject.equal(imageSurfaceLayerB))
            {
                imageSurfaceLayerB = null;
            }
            else if (earthObject.equal(imageSurfaceLayerC))
            {
                imageSurfaceLayerC = null;
            }
            else if (earthObject.equal(vectorSurfaceLayerD))
            {
                vectorSurfaceLayerD = null;
            }
            else if (earthObject.equal(groupOfEFG))
            {
                groupOfEFG          = null;
                vectorSurfaceLayerE = null;
                vectorSurfaceLayerF = null;
                vectorSurfaceLayerG = null;
            }

            m_earthRoot.removeChildByPos(pos);
        }