private void InitializeCommandManager()
        {
            _commandManager = new ForwardingCommandManager();
            //_commandManager.CommandInvalidated += HandleCommandInvalidated;

            _commandManager.Register(CommandKey.LevelOpen, CommandCanOpenLevel, CommandOpenLevel);

            _commandManager.Perform(CommandKey.ViewGrid);
        }
Esempio n. 2
0
        private void InitializeCommandManager()
        {
            _commandManager = new ForwardingCommandManager();

            _commandManager.AddCommandSubscriber(Manager.Lookup <TilePoolListPresenter>());
            _commandManager.AddCommandSubscriber(Manager.Lookup <ObjectPoolCollectionPresenter>());
            _commandManager.AddCommandSubscriber(Manager.Lookup <TileBrushManagerPresenter>());

            _commandManager.Register(CommandKey.NewProject, CommandCanCreateProject, CommandCreateProject);
            _commandManager.Register(CommandKey.OpenProject, CommandCanOpenProject, CommandOpenProject);
            _commandManager.Register(CommandKey.Save, CommandCanSaveProject, CommandSaveProject);
            _commandManager.Register(CommandKey.SaveAs, CommandCanSaveProjectAs, CommandSaveProjectAs);
            _commandManager.Register(CommandKey.Exit, CommandCanExit, CommandExit);
            _commandManager.Register(CommandKey.ProjectAddLevel, CommandCanAddLevel, CommandAddLevel);
            _commandManager.Register(CommandKey.LevelClose, CommandCanCloseLevel, CommandCloseLevel);
            _commandManager.Register(CommandKey.LevelCloseAllOther, CommandCanCloseAllOtherLevels, CommandCloseAllOtherLevels);

            _commandManager.Register(CommandKey.LevelOpen, _levelCommandActions.CanOpenLevel, _levelCommandActions.CommandOpen);
            _commandManager.Register(CommandKey.LevelClone, _levelCommandActions.LevelExists, _levelCommandActions.CommandClone);
            _commandManager.Register(CommandKey.LevelDelete, _levelCommandActions.LevelExists, _levelCommandActions.CommandDelete);
            _commandManager.Register(CommandKey.LevelRename, _levelCommandActions.LevelExists, _levelCommandActions.CommandRename);
            _commandManager.Register(CommandKey.LevelProperties, _levelCommandActions.LevelExists, _levelCommandActions.CommandProperties);
        }
Esempio n. 3
0
        private void InitializeCommandManager()
        {
            _commandManager = new ForwardingCommandManager();
            //_commandManager.CommandInvalidated += HandleCommandInvalidated;

            _commandManager.Register(CommandKey.Undo, CommandCanUndo, CommandUndo);
            _commandManager.Register(CommandKey.Redo, CommandCanRedo, CommandRedo);
            _commandManager.Register(CommandKey.LevelRename, CommandCanRename, CommandRename);
            _commandManager.Register(CommandKey.LevelResize, CommandCanResize, CommandResize);
            _commandManager.Register(CommandKey.LevelProperties, CommandCanLevelProperties, CommandLevelProperties);
            _commandManager.Register(CommandKey.ViewZoomIn, CommandCanZoomIn, CommandZoomIn);
            _commandManager.Register(CommandKey.ViewZoomOut, CommandCanZoomOut, CommandZoomOut);
            _commandManager.Register(CommandKey.ViewZoomNormal, CommandCanZoomNormal, CommandZoomNormal);

            _commandManager.Register(CommandKey.NewTileLayer, CommandCanAddTileLayer, CommandAddTileLayer);
            _commandManager.Register(CommandKey.NewObjectLayer, CommandCanAddObjectLayer, CommandAddObjectLayer);
            _commandManager.Register(CommandKey.LayerEdit, CommandCanEditLayer, CommandEditLayer);
            _commandManager.Register(CommandKey.LayerClone, CommandCanCloneLayer, CommandCloneLayer);
            _commandManager.Register(CommandKey.LayerDelete, CommandCanDeleteLayer, CommandDeleteLayer);
            _commandManager.Register(CommandKey.LayerProperties, CommandCanLayerProperties, CommandLayerProperties);
            _commandManager.Register(CommandKey.LayerMoveTop, CommandCanMoveLayerTop, CommandMoveLayerTop);
            _commandManager.Register(CommandKey.LayerMoveUp, CommandCanMoveLayerUp, CommandMoveLayerUp);
            _commandManager.Register(CommandKey.LayerMoveDown, CommandCanMoveLayerDown, CommandMoveLayerDown);
            _commandManager.Register(CommandKey.LayerMoveBottom, CommandCanMoveLayerBottom, CommandMoveLayerBottom);
            _commandManager.Register(CommandKey.LayerShowAll, CommandCanShowAll, CommandShowAll);
            _commandManager.Register(CommandKey.LayerShowNone, CommandCanShowNone, CommandShowNone);
            _commandManager.Register(CommandKey.LayerShowCurrentOnly, CommandCanShowSelectedOnly, CommandShowSelectedOnly);

            _commandManager.RegisterToggle(CommandKey.ViewGrid, CommandCanToggleGrid, CommandToggleGrid);

            _commandManager.Perform(CommandKey.ViewGrid);
        }
Esempio n. 4
0
        private void InitializeCommandManager()
        {
            _commandManager = new ForwardingCommandManager();

            _commandManager.AddCommandSubscriber(_presentation.TilePoolList);
            _commandManager.AddCommandSubscriber(_presentation.ObjectPoolCollection);
            _commandManager.AddCommandSubscriber(_presentation.TileBrushes);

            _commandManager.Register(CommandKey.NewProject, CommandCanCreateProject, CommandCreateProject);
            _commandManager.Register(CommandKey.OpenProject, CommandCanOpenProject, CommandOpenProject);
            _commandManager.Register(CommandKey.Save, CommandCanSaveProject, CommandSaveProject);
            _commandManager.Register(CommandKey.SaveAs, CommandCanSaveProjectAs, CommandSaveProjectAs);
            _commandManager.Register(CommandKey.Exit, CommandCanExit, CommandExit);
            _commandManager.Register(CommandKey.ProjectAddLevel, CommandCanAddLevel, CommandAddLevel);

            //_commandManager.RegisterToggle(CommandKey.ViewGrid);

            //_commandManager.Perform(CommandKey.ViewGrid);
        }
Esempio n. 5
0
        private void InitializeCommandManager()
        {
            _commandManager = new ForwardingCommandManager();

            _commandManager.Register(CommandKey.Delete, CommandCanDelete, CommandDelete);
            _commandManager.Register(CommandKey.SelectAll, CommandCanSelectAll, CommandSelectAll);
            _commandManager.Register(CommandKey.SelectNone, CommandCanSelectNone, CommandSelectNone);
            _commandManager.Register(CommandKey.Cut, CommandCanCut, CommandCut);
            _commandManager.Register(CommandKey.Copy, CommandCanCopy, CommandCopy);
            _commandManager.Register(CommandKey.Paste, CommandCanPaste, CommandPaste);
            _commandManager.Register(CommandKey.ObjectMoveTop, CommandCanMoveObjectsToFront, CommandMoveObjectsToFront);
            _commandManager.Register(CommandKey.ObjectMoveUp, CommandCanMoveObjectsForward, CommandMoveObjectsForward);
            _commandManager.Register(CommandKey.ObjectMoveDown, CommandCanMoveObjectsBackward, CommandMoveObjectsBackward);
            _commandManager.Register(CommandKey.ObjectMoveBottom, CommandCanMoveObjectsToBack, CommandMoveObjectsToBack);
            _commandManager.Register(CommandKey.ObjectProperties, CommandCanObjectProperties, CommandObjectProperties);
        }
        private void InitializeCommandManager()
        {
            _commandManager = new ForwardingCommandManager();
            //_commandManager.CommandInvalidated += HandleCommandInvalidated;

            _commandManager.Register(CommandKey.LevelOpen, CommandCanOpenLevel, CommandOpenLevel);

            _commandManager.Perform(CommandKey.ViewGrid);
        }
Esempio n. 7
0
        private void InitializeCommandManager()
        {
            _commandManager = new ForwardingCommandManager();
            //_commandManager.CommandInvalidated += HandleCommandInvalidated;

            _commandManager.Register(CommandKey.Undo, CommandCanUndo, CommandUndo);
            _commandManager.Register(CommandKey.Redo, CommandCanRedo, CommandRedo);
            _commandManager.Register(CommandKey.LevelRename, CommandCanRename, CommandRename);
            _commandManager.Register(CommandKey.LevelResize, CommandCanResize, CommandResize);
            _commandManager.Register(CommandKey.LevelProperties, CommandCanLevelProperties, CommandLevelProperties);
            _commandManager.Register(CommandKey.ViewZoomIn, CommandCanZoomIn, CommandZoomIn);
            _commandManager.Register(CommandKey.ViewZoomOut, CommandCanZoomOut, CommandZoomOut);
            _commandManager.Register(CommandKey.ViewZoomNormal, CommandCanZoomNormal, CommandZoomNormal);

            _commandManager.Register(CommandKey.NewTileLayer, CommandCanAddTileLayer, CommandAddTileLayer);
            _commandManager.Register(CommandKey.NewObjectLayer, CommandCanAddObjectLayer, CommandAddObjectLayer);
            _commandManager.Register(CommandKey.LayerEdit, CommandCanEditLayer, CommandEditLayer);
            _commandManager.Register(CommandKey.LayerClone, CommandCanCloneLayer, CommandCloneLayer);
            _commandManager.Register(CommandKey.LayerDelete, CommandCanDeleteLayer, CommandDeleteLayer);
            _commandManager.Register(CommandKey.LayerProperties, CommandCanLayerProperties, CommandLayerProperties);
            _commandManager.Register(CommandKey.LayerMoveTop, CommandCanMoveLayerTop, CommandMoveLayerTop);
            _commandManager.Register(CommandKey.LayerMoveUp, CommandCanMoveLayerUp, CommandMoveLayerUp);
            _commandManager.Register(CommandKey.LayerMoveDown, CommandCanMoveLayerDown, CommandMoveLayerDown);
            _commandManager.Register(CommandKey.LayerMoveBottom, CommandCanMoveLayerBottom, CommandMoveLayerBottom);
            _commandManager.Register(CommandKey.LayerShowAll, CommandCanShowAll, CommandShowAll);
            _commandManager.Register(CommandKey.LayerShowNone, CommandCanShowNone, CommandShowNone);
            _commandManager.Register(CommandKey.LayerShowCurrentOnly, CommandCanShowSelectedOnly, CommandShowSelectedOnly);

            _commandManager.RegisterToggle(CommandKey.ViewGrid, CommandCanToggleGrid, CommandToggleGrid);

            _commandManager.Perform(CommandKey.ViewGrid);
        }