Пример #1
0
        private void SyncContentViewHandler(object sender, EventArgs e)
        {
            /*ILevelPresenter lp = _editor.CurrentLevel;
             *
             * if (lp != null) {
             *  foreach (TabPage page in tabControlEx1.TabPages) {
             *      if (page.Text == lp.LayerControl.Name) {
             *          tabControlEx1.SelectedTab = page;
             *      }
             *  }
             * }*/

            if (_editor.CanShowProjectPanel)
            {
                projectPanel1.BindController(_pm.Lookup <ProjectExplorerPresenter>());
            }

            if (_editor.CanShowLayerPanel)
            {
                layerPane1.BindController(_editor.Presentation.LayerList);
            }

            if (_editor.CanShowTilePoolPanel)
            {
                tilePoolPane1.BindController(_pm.Lookup <TilePoolListPresenter>());
            }

            if (_editor.CanShowObjectPoolPanel)
            {
                objectPanel1.BindController(_pm.Lookup <ObjectPoolCollectionPresenter>());
            }
            //objectPanel1.BindController(_editor.Presentation.ObjectPoolCollection);

            if (_editor.CanShowPropertyPanel)
            {
                propertyPane1.BindController(_pm.Lookup <PropertyListPresenter>());
            }

            if (_editor.CanShowTileBrushPanel)
            {
                tileBrushPanel1.BindController(_pm.Lookup <TileBrushManagerPresenter>());
                tileBrushPanel1.BindTileController(_pm.Lookup <TilePoolListPresenter>());
            }

            minimapPanel1.BindController(_pm.Lookup <MinimapPresenter>());

            _menu.BindController(_editor);
            _menu.BindCommandManager(_editor.CommandManager);
            //_tileToolbar.BindController(_editor.Presentation.LevelTools);
            if (_editor.CurrentLevel != null)
            {
                _tileToolbar.BindCommandManager(_editor.CurrentLevel.CommandManager);
            }
            _standardToolbar.BindCommandManager(_editor.CommandManager);
            _infoStatus.BindController(_editor.Presentation.ContentInfo);
        }