public FdoMapPreview() { InitializeComponent(); img = new MapImage(); img.Map = new Map(); img.Dock = DockStyle.Fill; mapContentPanel.Controls.Add(img); _presenter = new FdoMapPreviewPresenter(this, img); }
public FdoMapPreviewPresenter(IFdoMapView view, MapImage mimg) { _view = view; _mapImage = mimg; _mapImage.MouseMove += new MapImage.MouseEventHandler(MapMouseMove); _mapImage.MapQueried += new MapImage.MapQueryHandler(OnMapQueried); switch (_mapImage.ActiveTool) { case MapImage.Tools.Pan: _view.PanChecked = true; break; case MapImage.Tools.Query: _view.SelectChecked = true; break; case MapImage.Tools.ZoomIn: _view.ZoomInChecked = true; break; case MapImage.Tools.ZoomOut: _view.ZoomOutChecked = true; break; } }
private void mapImage_ActiveToolChanged(MapImage.Tools tool) { UpdatePropertyGrid(); }
private void changeMode(MapImage.Tools tool) { MainMapImage.ActiveTool = tool; ZoomInModeToolStripButton.Checked = (tool == MapImage.Tools.ZoomIn); ZoomOutModeToolStripButton.Checked = (tool == MapImage.Tools.ZoomOut); PanToolStripButton.Checked = (tool == MapImage.Tools.Pan); QueryModeToolStripButton.Checked = (tool == MapImage.Tools.Query); }