Class CommandExtensions
A set of helper functions for working with EPCommand and ICommandDescriptor
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.Core
Assembly: LemonEdge.ClientCore.dll
Syntax
public static class CommandExtensions
Methods
CreateCommand(EPCommand, ICommandDescriptor, CommandButtonType, bool, CommandSize)
Creates the actual UI component for the specified command, and detail. Uses the CommandFactory which is hooked up to the UI by the client application
Declaration
public static object CreateCommand(this EPCommand command, ICommandDescriptor descriptor, CommandButtonType type, bool showTitle, CommandSize size)
Parameters
Type | Name | Description |
---|---|---|
EPCommand | command | The command to use while creating the UI component for the command |
ICommandDescriptor | descriptor | A descriptor object for the command containing title, icon, etc |
CommandButtonType | type | The type of ui component to create for the command |
bool | showTitle | Indicates if the title should be visible, or to just use an icon |
CommandSize | size | The size to make the ui component of the command |
Returns
Type | Description |
---|---|
object | The actual UI component for the specified command, and detail. Uses the CommandFactory which is hooked up to the UI by the client application |
ToCommandDescriptor(ICustomCommand)
Declaration
public static ICommandDescriptor ToCommandDescriptor(this ICustomCommand command)
Parameters
Type | Name | Description |
---|---|---|
ICustomCommand | command |
Returns
Type | Description |
---|---|
ICommandDescriptor |
ToCommandDescriptor(IMenuItem)
Returns a command descriptor that holds all the equivelant detail of the configured menu item
Declaration
public static ICommandDescriptor ToCommandDescriptor(this IMenuItem menuItem)
Parameters
Type | Name | Description |
---|---|---|
IMenuItem | menuItem | The menu item detail to represent as a ICommandDescriptor for use throughout the UI |
Returns
Type | Description |
---|---|
ICommandDescriptor | A command descriptor that holds all the equivalent detail of the configured menu item |
UpdateCommand(EPCommand, object, ICommandDescriptor, bool, CommandSize)
Updates a provided ui component (btn
) to use the specified command and details
Declaration
public static void UpdateCommand(this EPCommand command, object btn, ICommandDescriptor descriptor, bool showTitle, CommandSize size)
Parameters
Type | Name | Description |
---|---|---|
EPCommand | command | The command to use while updating the UI component for the command |
object | btn | The ui component to be updated with this command and detail |
ICommandDescriptor | descriptor | A descriptor object for the command containing title, icon, etc |
bool | showTitle | Indicates if the title should be visible, or to just use an icon |
CommandSize | size | The size to make the ui component of the command |