Exemple #1
0
        private void ShowContextMenu(TreeNode selectedNode, Point mouseLocation)
        {
            switch (selectedNode.Name.ToLower())
            {
            case "projectnode":
            {
                ProjectMenu.Show(mouseLocation);
                break;
            }

            case "spritesnode":
            {
                SpritesMenu.Show(mouseLocation);
                break;
            }

            case "spritenode":
            {
                SpriteMenu.Show(mouseLocation);
                break;
            }

            case "spritefilternode":
            {
                SpritesMenu.Show(mouseLocation);
                break;
            }

            case "animationsnode":
            {
                AnimationsMenu.Show(mouseLocation);
                break;
            }

            case "animationnode":
            {
                AnimationMenu.Show(mouseLocation);
                break;
            }

            case "spritesheetnode":
            {
                SpriteSheetMenu.Show(mouseLocation);
                break;
            }
            }
        }
        private void ShowContextMenu(TreeNode selectedNode, Point mouseLocation)
        {
            switch (selectedNode.Name.ToLower())
            {
            case "projectnode":
            {
                ProjectMenu.Show(mouseLocation);
                break;
            }

            case "mapsnode":
            {
                MapsMenu.Show(mouseLocation);
                break;
            }

            case "mapnode":
            {
                MapMenu.Show(mouseLocation);
                break;
            }

            case "tilesnode":
            {
                TilesMenu.Show(mouseLocation);
                break;
            }

            case "layernode":
            {
                if (selectedNode.Tag is TileLayer <Tile> )
                {
                    TileLayer <Tile> layer = (TileLayer <Tile>)selectedNode.Tag;
                    visibleToolStripMenuItem.Checked = layer.Visible;
                    LayerMenu.Show(mouseLocation);
                }
                break;
            }

            case "tilefilternode":
            {
                TilesMenu.Show(mouseLocation);
                break;
            }
            }
        }