public bool SetCurrentType(OperatingToolType t) { bool r = false; if (mapTools.ContainsKey(t)) { currentTool = mapTools[t]; r = true; } return(r); }
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; }