예제 #1
0
        private bool HandleCursors(AppCommand command)
        {
            switch (command)
            {
            case AppCommand.SelectByPolygon:
                return(SetMapCursor(tkCursorMode.cmSelectByPolygon));

            case AppCommand.Identify:
                return(SetMapCursor(tkCursorMode.cmIdentify));

            case AppCommand.Measure:
                App.Map.Measuring.MeasuringType = tkMeasuringType.MeasureDistance;
                return(SetMapCursor(tkCursorMode.cmMeasure));

            case AppCommand.MeasureArea:
                App.Map.Measuring.MeasuringType = tkMeasuringType.MeasureArea;
                return(SetMapCursor(tkCursorMode.cmMeasure));

            case AppCommand.Pan:
                return(SetMapCursor(tkCursorMode.cmPan));

            case AppCommand.Select:
                return(SetMapCursor(tkCursorMode.cmSelection));

            case AppCommand.ZoomIn:
                return(SetMapCursor(tkCursorMode.cmZoomIn));

            case AppCommand.ZoomOut:
                return(SetMapCursor(tkCursorMode.cmZoomOut));

            case AppCommand.ZoomToSelected:
                LayerHelper.ZoomToSelected();
                break;

            case AppCommand.ClearSelection:
                LayerHelper.ClearSelection();
                break;

            case AppCommand.None:
                return(true);
            }
            return(false);
        }