Class ControlCommandCreator
A class that is implemented by a client application so that LemonEdge can create ui component buttons for LemonEdge commands as required
This is not used internally by the LemonEdge core, but can be used by the client application (via CommandExtensions) as a central mechanism for creating, and dealing with commands to integrate into their respective UIs
Inheritance
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: ClientCore.dll
Syntax
public abstract class ControlCommandCreator
Methods
CreateCommand(IModelLayoutCommon, Guid)
Creates a command implementation for the specified unique command type
Declaration
public static EPCommand CreateCommand(IModelLayoutCommon modelLayoutCommon, Guid type)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | modelLayoutCommon | The host context in which the command will operate |
System.Guid | type | The id of the unique command to create |
Returns
Type | Description |
---|---|
EPCommand | A command implementation for the specified unique command |
CreateControlCommand(EPCommand, ICommandDescriptor, CommandButtonType, Boolean, CommandSize)
Creates the actual UI component for the specified command, and detail.
Declaration
public abstract object CreateControlCommand(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 |
System.Boolean | 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 |
---|---|
System.Object | The actual UI component for the specified command, and detail. |
GetParameterType(Guid)
Returns the parameter type associated with the specified unique command type.
Retrieved from CommandDescriptorOptionsAttribute marked against a command implementation
Declaration
public static Type GetParameterType(Guid commandType)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | commandType | The command type to retrieve any parameter type for |
Returns
Type | Description |
---|---|
System.Type | The parameter type associated with the specified unique command type. |
UnlinkButton(Object)
Provides the client application the opportunity to unlink a button before it is disposed. This allows the removal of handlers or other cleanup
Declaration
public virtual void UnlinkButton(object btn)
Parameters
Type | Name | Description |
---|---|---|
System.Object | btn | The ui component to unlink |
UnlinkCommandButton(Object)
Provides the client application the opportunity to unlink a button before it is disposed. This allows the removal of handlers or other cleanup
Declaration
public static void UnlinkCommandButton(object btn)
Parameters
Type | Name | Description |
---|---|---|
System.Object | btn | The ui component to unlink |
UpdateControlCommand(EPCommand, Object, ICommandDescriptor, Boolean, CommandSize)
Updates a provided ui component (btn
) to use the specified command and details
Declaration
public abstract void UpdateControlCommand(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 |
System.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 |
System.Boolean | 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 |