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); }
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; }
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); }