public FancyViewModel CreateViewModel(IBlueprintBuilder builder, IRectangleSection fittingRectangle)
        {
            var tiles           = tilesFactory.CreateTiles(builder.Dimensions, fittingRectangle);
            var detailsUpdaters = CreateDetailsUpdaters(builder, tiles);

            var viewModel = new FancyViewModel(detailsUpdaters);

            builder.AttachObserver(viewModel);
            return(viewModel);
        }
Exemplo n.º 2
0
        public ViewModel CreateViewModel(IBlueprintBuilder builder, IRectangleSection fittingRectangle)
        {
            var tiles           = tilesFactory.CreateTiles(builder.Dimensions, fittingRectangle);
            var objectTable     = CreateObjectTable(tiles);
            var controlAssigner = CreateController(builder, new TableHighlighter(objectTable));

            AssignTileControls(builder, tiles, controlAssigner);

            var viewModel = CreateViewModel(builder, objectTable, controlAssigner, CreateShipComponentsFactories());

            builder.AttachObserver(viewModel);
            return(viewModel);
        }