Exemple #1
0
        public override void OnMouseUp(int Button, int Shift, int X, int Y)
        {
            // TODO:  Add Pan.OnMouseUp implementation
            //ÅжÏÊÇ·ñÊó±ê×ó¼ü
            if (Button != 1)
            {
                return;
            }
            //ÊÇ·ñÂþÓÎ״̬
            if (!m_PanOperation)
            {
                return;
            }

            IEnvelope pExtent = m_focusScreenDisplay.PanStop();

            //ÅжÏÒƶ¯ÇøÓòÊÇ·ñΪ¿Õ
            if (pExtent != null)
            {
                m_focusScreenDisplay.DisplayTransformation.VisibleBounds = pExtent;
                m_focusScreenDisplay.Invalidate(null, true, (short)esriScreenCache.esriAllScreenCaches);
            }
            //¹Ø±ÕÂþÓÎ״̬
            m_PanOperation = false;
        }
Exemple #2
0
        public override void OnMouseUp(int Button, int Shift, int X, int Y)
        {
            // TODO:  Add Pan.OnMouseUp implementation

            //判断是否鼠标左键
            if (Button != 1)
            {
                return;
            }
            //是否漫游状态
            if (!m_PanOperation)
            {
                return;
            }
            IEnvelope pExtent = m_focusScreenDisplay.PanStop();

            //判断移动区域是否为空
            if (pExtent != null)
            {
                m_focusScreenDisplay.DisplayTransformation.VisibleBounds = pExtent;
                m_focusScreenDisplay.Invalidate(null, true, (short)esriScreenCache.esriAllScreenCaches);
            }
            //关闭漫游状态
            m_PanOperation = false;
        }
Exemple #3
0
 void axMapControl1_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e)
 {
     if (mScreenDisplay != null && 4 == e.button)
     {
         mScreenDisplay.PanStop();
         this.axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewAll, null, this.axMapControl1.ActiveView.Extent);
     }
 }
Exemple #4
0
        public void OnMouseUp(int button, int shift, int x, int y)
        {
            if (button != 1)
            {
                return;
            }

            if (!m_PanOperation)
            {
                return;
            }

            IEnvelope extent = m_focusScreenDisplay.PanStop();

            //Check if user dragged a rectangle or just clicked.
            //If a rectangle was dragged, m_ipFeedback in non-NULL
            if (extent != null)
            {
                m_focusScreenDisplay.DisplayTransformation.VisibleBounds = extent;
                m_focusScreenDisplay.Invalidate(null, true, (short)esriScreenCache.esriAllScreenCaches);
            }

            m_PanOperation = false;
        }