Exemplo n.º 1
0
        public static MapViewController Create(MapView mapView, Model model)
        {
            MapViewController mapViewController = new MapViewController(mapView);

            model.mapViewPosition.AddObserver(mapViewController);

            return(mapViewController);
        }
        public static LayerManagerController Create(LayerManager layerManager, Model model)
        {
            LayerManagerController layerManagerController = new LayerManagerController(layerManager);

            model.mapViewDimension.AddObserver(layerManagerController);
            model.mapViewPosition.AddObserver(layerManagerController);

            return(layerManagerController);
        }
Exemplo n.º 3
0
        public static FrameBufferController Create(FrameBuffer frameBuffer, Model model)
        {
            FrameBufferController frameBufferController = new FrameBufferController(frameBuffer, model);

            model.frameBufferModel.AddObserver(frameBufferController);
            model.mapViewDimension.AddObserver(frameBufferController);
            model.mapViewPosition.AddObserver(frameBufferController);
            model.displayModel.AddObserver(frameBufferController);

            return(frameBufferController);
        }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void repaintTest()
        public virtual void repaintTest()
        {
            DummyMapView dummyMapView = new DummyMapView();
            Model        model        = new Model();

            MapViewController.create(dummyMapView, model);
            Assert.assertEquals(0, dummyMapView.repaintCounter);

            model.mapViewPosition.ZoomLevel = (sbyte)1;
            // this does not hold with zoom animation
            // Assert.assertEquals(1, dummyMapView.repaintCounter);
        }
Exemplo n.º 5
0
 private FrameBufferController(FrameBuffer frameBuffer, Model model)
 {
     this.frameBuffer = frameBuffer;
     this.model       = model;
 }