Exemplo n.º 1
0
            public void ShowContextMenu(CommandManager commandManager)
            {
                PushpinContextCommand command =
                    MapContextMenu.ShowPushpinContextMenu(_mapControl, _mapControl.PointToScreen(new Point(_event.X, _event.Y)), commandManager);

                switch (command)
                {
                case PushpinContextCommand.DeletePushpin:
                    DeletePushpin();
                    break;

                case PushpinContextCommand.EditPushpin:
                    EditPushpin();
                    break;

                case PushpinContextCommand.None:
                    break;

                default:
                    Debug.Fail("Unknown PushpinContextCommand: " + command.ToString());
                    break;
                }
            }
Exemplo n.º 2
0
            public void ShowContextMenu(CommandManager commandManager)
            {
                MapContextCommand command =
                    MapContextMenu.ShowMapContextMenu(_mapControl, _mapControl.PointToScreen(new Point(_event.X, _event.Y)),
                                                      CalculateExcludedCommands(), commandManager);

                switch (command)
                {
                case MapContextCommand.AddPushpin:
                    AddPushpin();
                    break;

                case MapContextCommand.CenterMap:
                    CenterMap();
                    break;

                case MapContextCommand.ZoomCityLevel:
                    ZoomCityLevel();
                    break;

                case MapContextCommand.ZoomStreetLevel:
                    ZoomStreetLevel();
                    break;

                case MapContextCommand.ZoomRegionLevel:
                    ZoomRegionLevel();
                    break;

                case MapContextCommand.None:
                    break;

                default:
                    Debug.Fail("Unknown MapContextCommand: " + command.ToString());
                    break;
                }
            }