Beispiel #1
0
        public override void Run(object sender, System.EventArgs e)
        {
            IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView;

            if (mapView == null)
            {
                return;
            }
            bool bBind = mapView.Bind(this);

            if (!bBind)
            {
                return;
            }
            DF2DApplication app = DF2DApplication.Application;

            if (app == null || app.Current2DMapControl == null)
            {
                return;
            }
            IExtentStack pExtentStack = app.Current2DMapControl.ActiveView.ExtentStack;

            if (pExtentStack.CanRedo())
            {
                pExtentStack.Redo();
            }

            app.Current2DMapControl.ActiveView.Refresh();
        }
Beispiel #2
0
        private void MapNextExtent()
        {
            IExtentStack pExtentStack2 = axMapControl1.ActiveView.ExtentStack;

            if (pExtentStack2.CanRedo())
            {
                pExtentStack2.Redo();
            }
        }
Beispiel #3
0
        public override void OnClick()
        {
            IActiveView  focusMap    = (IActiveView)_context.FocusMap;
            IExtentStack extentStack = focusMap.ExtentStack;

            if (extentStack.CanRedo())
            {
                extentStack.Redo();
                focusMap.Refresh();
            }
        }
        public void OnClick()
        {
            //Get the active view
            IActiveView pActiveView = (IActiveView)m_pHookHelper.FocusMap;

            //Get the extent stack
            IExtentStack pMapExtent = (IExtentStack)pActiveView.ExtentStack;

            //Redo the extent
            if (pMapExtent.CanRedo())
            {
                pMapExtent.Redo();
            }
        }
Beispiel #5
0
        private void barButtonItem35_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            IExtentStack pExtentStack = null;

            pExtentStack = axMapControl1.ActiveView.ExtentStack;

            if (pExtentStack.CanRedo())

            {
                pExtentStack.Redo();
            }

            axMapControl1.Refresh();
        }
Beispiel #6
0
        private void 后一个视图ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IExtentStack pExtentStack = axMapControl1.ActiveView.ExtentStack;


            if (pExtentStack.CanRedo())
            {
                pExtentStack.Redo();                  //转到后一个视图
                一个视图ToolStripMenuItem.Enabled = true; //转到后一个视图后,说明其前面有一个视图,此时上一个视图这个按钮变成可按
                if (!pExtentStack.CanRedo())
                {
                    后一个视图ToolStripMenuItem.Enabled = false;//如果之后没有后一个视图了,后一个视图按钮变灰
                }
            }
            axMapControl1.ActiveView.Refresh();
        }
Beispiel #7
0
        private void toolnextview_Click(object sender, EventArgs e)//后一视图
        {
            IExtentStack viewStack = null;

            viewStack = axMapControl1.ActiveView.ExtentStack;
            if (viewStack.CanRedo())
            {
                viewStack.Redo();
                axMapControl1.Refresh();
                axMapControl1.MousePointer = esriControlsMousePointer.esriPointerDefault;
            }
            else
            {
                MessageBox.Show("这已是最后视图", "提示", MessageBoxButtons.OK);
            }
        }
Beispiel #8
0
        private void reDoMenuItem_Click(object sender, EventArgs e)
        {
            //判断是否可以回到后一视图,最后一个视图没有后一视图
            IExtentStack pExtentStack = m_mapControl.ActiveView.ExtentStack;

            if (pExtentStack.CanRedo())
            {
                pExtentStack.Redo();
                unDoMenuItem.Enabled = true;    //前一视图按钮可以使用
                if (!pExtentStack.CanRedo())
                {
                    reDoMenuItem.Enabled = false;
                }
            }
            m_mapControl.ActiveView.Refresh();
        }