Class MoveItemDown<T>
A view command that moves the selected items down (incrementing their index) within a collection of items
Works against entities with a sequence property marked with the EntitySequenceAttribute
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.ViewCommands
Assembly: ClientCore.dll
Syntax
public class MoveItemDown<T> : ViewCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Type Parameters
Name | Description |
---|---|
T | The type of entity this command works against |
Constructors
MoveItemDown(IModelLayoutDisplayer, BaseGridControllerAny<T>)
Creates a new MoveItemDown command
Declaration
public MoveItemDown(IModelLayoutDisplayer owner, BaseGridControllerAny<T> controller)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutDisplayer | owner | The owning host context for this command |
BaseGridControllerAny<T> | controller | The gridcontroller this command works against to move the selected items down within |
Properties
Description
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
OverlayIconID
Declaration
public override Guid? OverlayIconID { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
Overrides
Title
Declaration
public override string Title { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ToolTip
Declaration
public override string ToolTip { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
InternalCanExecuteAsync(Object)
Returns true if there are selected items in the grid and they are not the last item in the grid (as they can not be moved down anymore)
Declaration
public override Task<bool> InternalCanExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | True if there are selected items in the grid and they are not the last item in the grid (as they can not be moved down anymore) |
Overrides
InternalExecuteAsync(Object)
Retrieves all the items selected to move down, then increments their sequence number, and decrements all those items above them. Updates the grid display to show the items having moved down.
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | The command parameters |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |