コード例 #1
0
 static StandardMapView2DMapTools()
 {
     None = new MapTool<IMapView2D, Point2D>(String.Empty, DoNothing, DoNothing, DoNothing, DoNothing);
     Pan = new MapTool<IMapView2D, Point2D>("Pan", QueryPan, BeginPan, ContinuePan, EndPan);
     ZoomIn = new MapTool<IMapView2D, Point2D>("ZoomIn", QueryZoomIn, BeginZoomIn, ContinueZoomIn, EndZoomIn);
     ZoomOut = new MapTool<IMapView2D, Point2D>("ZoomOut", 
                                                QueryZoomOut, 
                                                BeginZoomOut, 
                                                ContinueZoomOut, 
                                                EndZoomOut);
     Query = new MapTool<IMapView2D, Point2D>("Query", QueryQuery, BeginQuery, ContinueQuery, EndQuery);
     QueryAdd = new MapTool<IMapView2D, Point2D>("QueryAdd", 
                                                 QueryQueryAdd, 
                                                 BeginQueryAdd, 
                                                 ContinueQueryAdd, 
                                                 EndQueryAdd);
     QueryRemove = new MapTool<IMapView2D, Point2D>("QueryRemove", 
                                                    QueryQueryRemove, 
                                                    BeginQueryRemove, 
                                                    ContinueQueryRemove,
                                                    EndQueryRemove);
     FeatureAdd = new MapTool<IMapView2D, Point2D>("FeatureAdd", 
                                                   QueryFeatureAdd, 
                                                   BeginFeatureAdd, 
                                                   ContinueFeatureAdd,
                                                   EndFeatureAdd);
     FeatureRemove = new MapTool<IMapView2D, Point2D>("FeatureRemove", 
                                                      QueryFeatureRemove, 
                                                      BeginFeatureRemove,
                                                      ContinueFeatureRemove, 
                                                      EndFeatureRemove);
 }
コード例 #2
0
 static StandardMapView2DMapTools()
 {
     None    = new MapTool <IMapView2D, Point2D>(String.Empty, DoNothing, DoNothing, DoNothing, DoNothing);
     Pan     = new MapTool <IMapView2D, Point2D>("Pan", QueryPan, BeginPan, ContinuePan, EndPan);
     ZoomIn  = new MapTool <IMapView2D, Point2D>("ZoomIn", QueryZoomIn, BeginZoomIn, ContinueZoomIn, EndZoomIn);
     ZoomOut = new MapTool <IMapView2D, Point2D>("ZoomOut",
                                                 QueryZoomOut,
                                                 BeginZoomOut,
                                                 ContinueZoomOut,
                                                 EndZoomOut);
     Query    = new MapTool <IMapView2D, Point2D>("Query", QueryQuery, BeginQuery, ContinueQuery, EndQuery);
     QueryAdd = new MapTool <IMapView2D, Point2D>("QueryAdd",
                                                  QueryQueryAdd,
                                                  BeginQueryAdd,
                                                  ContinueQueryAdd,
                                                  EndQueryAdd);
     QueryRemove = new MapTool <IMapView2D, Point2D>("QueryRemove",
                                                     QueryQueryRemove,
                                                     BeginQueryRemove,
                                                     ContinueQueryRemove,
                                                     EndQueryRemove);
     FeatureAdd = new MapTool <IMapView2D, Point2D>("FeatureAdd",
                                                    QueryFeatureAdd,
                                                    BeginFeatureAdd,
                                                    ContinueFeatureAdd,
                                                    EndFeatureAdd);
     FeatureRemove = new MapTool <IMapView2D, Point2D>("FeatureRemove",
                                                       QueryFeatureRemove,
                                                       BeginFeatureRemove,
                                                       ContinueFeatureRemove,
                                                       EndFeatureRemove);
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: pobingwanghai/SharpMapV2
        private void changeMode(MapTool tool)
        {
            _map.ActiveTool = tool;

            ZoomInModeToolStripButton.Checked = (tool == StandardMapTools2D.ZoomIn);
            ZoomOutModeToolStripButton.Checked = (tool == StandardMapTools2D.ZoomOut);
            PanModeToolStripButton.Checked = (tool == StandardMapTools2D.Pan);
            QueryModeToolStripButton.Checked = (tool == StandardMapTools2D.Query);
        }
コード例 #4
0
 public ToolChangeRequestedEventArgs(MapTool requestedTool)
 {
     _requestedTool = requestedTool;
 }