Ejemplo n.º 1
0
        /// <summary>
        /// Attach the specified Model and View.
        /// </summary>
        /// <param name="model">The model</param>
        /// <param name="view">The view</param>
        /// <param name="explorerPresenter">The parent explorer presenter</param>
        public void Attach(object model, object view, ExplorerPresenter explorerPresenter)
        {
            this.map  = model as Map;
            this.view = view as IMapView;
            this.explorerPresenter = explorerPresenter;

            propertyPresenter = new SimplePropertyPresenter();
            propertyPresenter.Attach(model, this.view.PropertiesGrid, this.explorerPresenter);

            // Tell the view to populate the axis.
            this.PopulateView();
            this.view.Zoom         = this.map.Zoom;
            this.view.Center       = this.map.Center;
            this.view.ViewChanged += this.OnViewChanged;
            explorerPresenter.CommandHistory.ModelChanged += OnModelChanged;
        }