Exemplo n.º 1
0
        public static ZoomInfo CreateZoom(DisplayTypes displayType, int zoomLevel)
        {
            ZoomInfo zoom;

            switch (displayType)
            {
            case DisplayTypes.Icon:
                zoom = IconDrawerFactory.CreateZoom(zoomLevel);
                break;

            case DisplayTypes.Shape:
                zoom = ShapeDrawerFactory.CreateZoom(zoomLevel);
                break;

            default:
                throw new Exception("oeps");
            }

            return(zoom);
        }
Exemplo n.º 2
0
        public static DrawerFactoryBase Create(DisplayTypes displayType, int zoomLevel, IconDrawerFactory.Scenery scenery)
        {
            DrawerFactoryBase drawerFactory;
            switch (displayType)
            {
                case DisplayTypes.Icon:
                    drawerFactory = new IconDrawerFactory(zoomLevel, scenery);
                    break;

                case DisplayTypes.Shape:
                    drawerFactory = new ShapeDrawerFactory(zoomLevel);
                    break;

                default:
                    throw new Exception("oeps");
            }

            drawerFactory.SetVillageDimensions();
            return drawerFactory;
        }
Exemplo n.º 3
0
        public static DrawerFactoryBase Create(DisplayTypes displayType, int zoomLevel, IconDrawerFactory.Scenery scenery)
        {
            DrawerFactoryBase drawerFactory;

            switch (displayType)
            {
            case DisplayTypes.Icon:
                drawerFactory = new IconDrawerFactory(zoomLevel, scenery);
                break;

            case DisplayTypes.Shape:
                drawerFactory = new ShapeDrawerFactory(zoomLevel);
                break;

            default:
                throw new Exception("oeps");
            }

            drawerFactory.SetVillageDimensions();
            return(drawerFactory);
        }