Пример #1
0
    public bool SetCurrentType(OperatingToolType t)
    {
        bool r = false;

        if (mapTools.ContainsKey(t))
        {
            currentTool = mapTools[t];
            r           = true;
        }
        return(r);
    }
Пример #2
0
 public void Init(GisViewer v)
 {
     viewer = v;
     GisOperatingTool.SetHost(this);
     mapTools = new Dictionary <OperatingToolType, GisOperatingTool>();
     mapTools.Add(OperatingToolType.GISHand, new GisHandTool(viewer));
     mapTools.Add(OperatingToolType.GISPolyline, new GisPolylineTool());
     mapTools.Add(OperatingToolType.GISPolygon, new GisPolygonTool());
     mapTools.Add(OperatingToolType.GISPoint, new GisPointTool());
     mapTools.Add(OperatingToolType.GISBoxSelect, new GisBoxSelect());
     mapTools.Add(OperatingToolType.GISPointSelect, new GisPointSelect());
     mapTools.Add(OperatingToolType.GISCircleSelect, new GisCircleSelect());
     mapTools.Add(OperatingToolType.GISPolygonSelect, new GisPolygonSelect());
     SetCurrentType(OperatingToolType.GISHand);
     sqtype = SpatialRelation_TYPE.hhhwSRT_Intersect;
 }