static void ExecuteCommand(BoardContainerBase container, ContainerCommand command, int bulletinId) { _DCT.Execute((data) => { switch (command) { case ContainerCommand.Publish: container.AddBulletin(null, null); break; case ContainerCommand.Edit: container.EditBulletin(null); break; case ContainerCommand.Update: container.UpdateBulletin(); break; case ContainerCommand.Disable: container.CloseBulletin(); break; case ContainerCommand.ShowStatistics: container.GetStats(); break; } }, _DCTGroup.BulletinContainerList); }
public ExecuteCommandMoveContainerIntoContainer(IActivateItems activator, ContainerCommand containerCommand, IContainer targetContainer) : base(activator) { _containerCommand = containerCommand; _targetContainer = targetContainer; if (containerCommand.AllSubContainersRecursive.Contains(targetContainer)) { SetImpossible("You cannot move a container (AND/OR) into one of it's own subcontainers"); } }
internal static void Execute(string uid, ContainerCommand command, int bulletinId) { _DCT.Execute((data) => { var container = Get(uid); if (container != null) { ExecuteCommand(container, command, bulletinId); } }, _DCTGroup.BulletinContainerList); }