Class MoveItemUp<T>
A view command that moves the selected items up (decrementing 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 MoveItemUp<T> : ViewCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Type Parameters
Name | Description |
---|---|
T | The type of entity this command works against |
Constructors
MoveItemUp(IModelLayoutDisplayer, BaseGridControllerAny<T>)
Creates a new MoveItemUp command
Declaration
public MoveItemUp(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 up 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 first item in the grid (as they can not be moved up 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 first item in the grid (as they can not be moved up anymore) |
Overrides
InternalExecuteAsync(Object)
Retrieves all the items selected to move up, then decrements their sequence number, and increments all those items below them. Updates the grid display to show the items having moved up.
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 |