Esempio n. 1
0
        public void Attach(object model, object view, ExplorerPresenter explorerPresenter)
        {
            ForestryModel = model as TreeProxy;
            ForestryViewer = view as TreeProxyView;

            AttachData();
            ForestryViewer.OnCellEndEdit += OnCellEndEdit;
            ForestryViewer.SetReadOnly();
            this.propertyPresenter = new PropertyPresenter();
            this.propertyPresenter.Attach(ForestryModel, ForestryViewer.ConstantsGrid, explorerPresenter);
        }
Esempio n. 2
0
        /// <summary>
        /// Attach the presenter to the model and view.
        /// </summary>
        /// <param name="model">The model object.</param>
        /// <param name="view">The view object.</param>
        /// <param name="explorerPresenter">The explorer presenter.</param>
        public void Attach(object model, object view, ExplorerPresenter explorerPresenter)
        {
            forestryModel  = model as TreeProxy;
            forestryViewer = view as TreeProxyView;
            presenter      = explorerPresenter;

            AttachData();
            forestryViewer.OnCellEndEdit          += OnCellEndEdit;
            presenter.CommandHistory.ModelChanged += OnModelChanged;

            propertyPresenter = new PropertyPresenter();
            propertyPresenter.Attach(forestryModel, forestryViewer.Constants, explorerPresenter);
            spatialGridPresenter.Attach(forestryModel, forestryViewer.SpatialDataGrid, explorerPresenter);
            temporalGridPresenter.Attach(forestryModel, forestryViewer.TemporalDataGrid, explorerPresenter);
        }