Ejemplo n.º 1
0
        /// <summary>
        /// Occurs when this tool is clicked
        /// </summary>
        public override void OnClick()
        {
            if (m_frmAttributeEdit == null)
            {
                m_frmAttributeEdit             = new frmAttributeEdit(m_MapControl, m_enumAttributeEditMode);
                m_frmAttributeEdit.Owner       = m_mainFrm;
                m_frmAttributeEdit.FormClosed += new FormClosedEventHandler(frmAttributeEdit_FormClosed);
            }

            m_frmAttributeEdit.Show();
            m_frmAttributeEdit.FillData(m_MapControl.ActiveView.FocusMap, null);
        }
Ejemplo n.º 2
0
        public override void OnMouseUp(int Button, int Shift, int X, int Y)
        {
            if (m_pNewEnvelope == null)
            {
                return;
            }

            IEnvelope pEnvelope     = m_pNewEnvelope.Stop();
            int       iPiexl        = 3;
            double    iMapTolerance = ConvertPixelsToMapUnits(m_MapControl.ActiveView, iPiexl);

            IGeometry pGeometry = null;

            if (pEnvelope == null || pEnvelope.IsEmpty)
            {
                ITopologicalOperator pTopo = (ITopologicalOperator)m_pPoint;
                if (pTopo != null)
                {
                    pGeometry = pTopo.Buffer(iMapTolerance);
                }
            }
            else
            {
                pEnvelope.SpatialReference = m_MapControl.ActiveView.FocusMap.SpatialReference;
                pGeometry = pEnvelope;
            }
            m_pNewEnvelope = null;

            if (m_frmAttributeEdit == null)
            {
                m_frmAttributeEdit             = new frmAttributeEdit(m_MapControl, m_enumAttributeEditMode);
                m_frmAttributeEdit.Owner       = m_mainFrm;
                m_frmAttributeEdit.FormClosed += new FormClosedEventHandler(frmAttributeEdit_FormClosed);
            }

            m_frmAttributeEdit.Show();
            m_frmAttributeEdit.FillData(m_MapControl.ActiveView.FocusMap, pGeometry);
        }
Ejemplo n.º 3
0
 private void frmAttributeEdit_FormClosed(object sender, FormClosedEventArgs e)
 {
     m_enumAttributeEditMode = m_frmAttributeEdit.AttributeEditMode;
     m_frmAttributeEdit      = null;
 }