public void BindCommandManager(CommandManager commandManager) { if (_commandManager != null) { _commandManager.CommandInvalidated -= HandleCommandInvalidated; _commandManager.ManagerInvalidated -= HandleManagerInvalidated; } _commandManager = commandManager; if (_commandManager != null) { _commandManager.CommandInvalidated += HandleCommandInvalidated; _commandManager.ManagerInvalidated += HandleManagerInvalidated; } ResetComponent(); }
public void BindCommandManager(CommandManager commandManager) { _commandController.BindCommandManager(commandManager); }
private void InitializeCommandManager() { _commandManager = new CommandManager(); }
private void InitializeCommandManager() { _commandManager = new CommandManager(); //_commandManager.CommandInvalidated += HandleCommandInvalidated; _commandManager.Register(CommandKey.ObjectProtoImport, CommandCanImportObject, CommandImportObject); _commandManager.Register(CommandKey.ObjectProtoDelete, CommandCanRemoveObject, CommandRemoveObject); _commandManager.Register(CommandKey.ObjectProtoProperties, CommandCanObjectProperties, CommandObjectProperties); _commandManager.RegisterToggleGroup(CommandToggleGroup.ObjectReference); _commandManager.RegisterToggle(CommandToggleGroup.ObjectReference, CommandKey.ObjectReferenceImage); _commandManager.RegisterToggle(CommandToggleGroup.ObjectReference, CommandKey.ObjectReferenceMask); _commandManager.RegisterToggle(CommandToggleGroup.ObjectReference, CommandKey.ObjectReferenceOrigin); _commandManager.RegisterToggleGroup(CommandToggleGroup.ObjectSnapping); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingBottom); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingBottomLeft); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingBottomRight); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingCenter); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingHorz); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingLeft); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingNone); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingRight); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingTop); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingTopLeft); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingTopRight); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingVert); _commandManager.Perform(CommandKey.ObjectReferenceImage); _commandManager.Perform(CommandKey.ObjectSnappingNone); }
private void InitializeCommandManager() { _commandManager = new CommandManager(); _commandManager.Register(CommandKey.NewStaticTileBrush, CommandCanCreateStaticBrush, CommandCreateStaticBrush); _commandManager.Register(CommandKey.NewDynamicTileBrush, CommandCanCreateDynamicBrush, CommandCreateDynamicBrush); _commandManager.Register(CommandKey.TileBrushClone, CommandCanCloneBrush, CommandCloneBrush); _commandManager.Register(CommandKey.TileBrushDelete, CommandCanDeleteBrush, CommandDeleteBrush); }
private void InitializeCommandManager() { _commandManager = new CommandManager(); _commandManager.Register(CommandKey.TileProperties, CommandCanTileProperties, CommandTileProperties); _commandManager.Register(CommandKey.TilePoolProperties, CommandCanTilePoolProperties, CommandTilePoolProperties); _commandManager.Register(CommandKey.TilePoolImport, CommandCanImport, CommandImport); _commandManager.Register(CommandKey.TilePoolDelete, CommandCanDelete, CommandDelete); _commandManager.Register(CommandKey.TilePoolExport, CommandCanExport, CommandExport); _commandManager.Register(CommandKey.TilePoolImportOver, CommandCanImportOver, CommandImportOver); }
private void InitializeCommandManager() { _commandManager = new CommandManager(); //_commandManager.CommandInvalidated += HandleCommandInvalidated; _commandManager.Register(CommandKey.ObjectProtoImport, CommandCanImportObject, CommandImportObject); _objectClassActions = new ObjectClassCommandActions(Manager); _commandManager.Register(CommandKey.ObjectProtoEdit, CommandCanOperateOnSelected, WrapCommand(_objectClassActions.CommandEdit)); _commandManager.Register(CommandKey.ObjectProtoClone, CommandCanOperateOnSelected, WrapCommand(_objectClassActions.CommandClone)); _commandManager.Register(CommandKey.ObjectProtoDelete, CommandCanOperateOnSelected, WrapCommand(_objectClassActions.CommandDelete)); _commandManager.Register(CommandKey.ObjectProtoRename, CommandCanOperateOnSelected, WrapCommand(_objectClassActions.CommandRename)); _commandManager.Register(CommandKey.ObjectProtoProperties, CommandCanOperateOnSelected, WrapCommand(_objectClassActions.CommandProperties)); _commandManager.RegisterToggleGroup(CommandToggleGroup.ObjectReference); _commandManager.RegisterToggle(CommandToggleGroup.ObjectReference, CommandKey.ObjectReferenceImage); _commandManager.RegisterToggle(CommandToggleGroup.ObjectReference, CommandKey.ObjectReferenceMask); _commandManager.RegisterToggle(CommandToggleGroup.ObjectReference, CommandKey.ObjectReferenceOrigin); _commandManager.RegisterToggleGroup(CommandToggleGroup.ObjectSnapping); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingBottom); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingBottomLeft); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingBottomRight); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingCenter); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingHorz); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingLeft); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingNone); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingRight); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingTop); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingTopLeft); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingTopRight); _commandManager.RegisterToggle(CommandToggleGroup.ObjectSnapping, CommandKey.ObjectSnappingVert); _commandManager.Perform(CommandKey.ObjectReferenceImage); _commandManager.Perform(CommandKey.ObjectSnappingNone); }
private void InitializeCommandManager() { _commandManager = new CommandManager(); _commandManager.Register(CommandKey.TileProperties, CommandCanTileProperties, CommandTileProperties); _commandManager.Register(CommandKey.TileDelete, CommandCanDeleteTile, CommandDeleteTile); _tilePoolActions = new TilePoolCommandActions(Manager); _commandManager.Register(CommandKey.TilePoolImport, () => { return true; }, _tilePoolActions.CommandImport); _commandManager.Register(CommandKey.TilePoolImportMerge, CommandCanOperateOnSelected, WrapCommand(_tilePoolActions.CommandImportMerge)); _commandManager.Register(CommandKey.TilePoolDelete, CommandCanOperateOnSelected, WrapCommand(_tilePoolActions.CommandDelete)); _commandManager.Register(CommandKey.TilePoolRename, CommandCanOperateOnSelected, WrapCommand(_tilePoolActions.CommandRename)); _commandManager.Register(CommandKey.TilePoolProperties, CommandCanOperateOnSelected, WrapCommand(_tilePoolActions.CommandProperties)); _commandManager.Register(CommandKey.TilePoolExport, CommandCanOperateOnSelected, WrapCommand(_tilePoolActions.CommandExport)); _commandManager.Register(CommandKey.TilePoolImportOver, CommandCanOperateOnSelected, WrapCommand(_tilePoolActions.CommandImportOver)); }
private void InitializeCommandManager() { _commandManager = new ForwardingCommandManager(); _commandManager.Perform(CommandKey.ViewGrid); }