示例#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);
        }
示例#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;
        }
示例#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);
        }