コード例 #1
0
        public override void OnDblClick()
        {
            ITin     pTin     = pTinLayer.Dataset;
            ITinEdit pTinEdit = pTin as ITinEdit;

            if (mNewPolygonFeedback != null)
            {
                IPolygon      polygon      = mNewPolygonFeedback.Stop();
                ITinSelection tinselection = pTinEdit as ITinSelection;
                tinselection.SelectByArea(esriTinElementType.esriTinNode, polygon, true, true, esriTinSelectionType.esriTinSelectionAdd);
                pTinEdit.DeleteSelectedNodes();
                mNewPolygonFeedback = null;
                IMapControl2 pMapCtr = (((IToolbarControl)m_hookHelper.Hook).Buddy) as IMapControl2;
                if (pMapCtr != null)
                {
                    pMapCtr.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
                }
            }
            base.OnDblClick();
        }
コード例 #2
0
ファイル: FrmAddTinPlane.cs プロジェクト: eglrp/TESTPROJECT-1
        public void CalPlaneHeight()
        {
            if (comboBoxExHeightSrc.SelectedIndex == 0)
            {
                ITinSelection pTinS = pTinEdit as ITinSelection;
                pTinS.SelectByArea(esriTinElementType.esriTinNode, (IPolygon)pGeometry, true, true, esriTinSelectionType.esriTinSelectionAdd);

                IEnumTinElement ienumtinnodes = pTinS.GetSelection(esriTinElementType.esriTinNode);
                ITinNode        pNode         = ienumtinnodes.Next() as ITinNode;
                double          maxHeight     = pNode.Z;
                while (pNode != null)
                {
                    if (pNode.Z > maxHeight)
                    {
                        maxHeight = pNode.Z;
                    }
                    pNode = ienumtinnodes.Next() as ITinNode;
                }
                setDoubleInputValue(maxHeight);
            }
            else
            if (comboBoxExHeightSrc.SelectedIndex == 0)
            {
                ITinSelection pTinS = pTinEdit as ITinSelection;
                pTinS.SelectByArea(esriTinElementType.esriTinNode, (IPolygon)pGeometry, true, true, esriTinSelectionType.esriTinSelectionAdd);

                IEnumTinElement ienumtinnodes = pTinS.GetSelection(esriTinElementType.esriTinNode);
                ITinNode        pNode         = ienumtinnodes.Next() as ITinNode;
                double          minHeight     = pNode.Z;
                while (pNode != null)
                {
                    if (pNode.Z < minHeight)
                    {
                        minHeight = pNode.Z;
                    }
                    pNode = ienumtinnodes.Next() as ITinNode;
                }
                setDoubleInputValue(minHeight);
            }
        }