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(); }
private void MapNextExtent() { IExtentStack pExtentStack2 = axMapControl1.ActiveView.ExtentStack; if (pExtentStack2.CanRedo()) { pExtentStack2.Redo(); } }
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(); } }
private void barButtonItem35_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { IExtentStack pExtentStack = null; pExtentStack = axMapControl1.ActiveView.ExtentStack; if (pExtentStack.CanRedo()) { pExtentStack.Redo(); } axMapControl1.Refresh(); }
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(); }
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); } }
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(); }