Class LoadFavourite
This command executes the LoadFavourite system command
A command which has each IFavourite item for this user loaded as child commands to this one which load that item when executed
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: ClientCore.dll
Syntax
[CommandDescriptorOptions(Commands.LoadFavourite, null)]
public class LoadFavourite : EPCommandWithDescriptor, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
LoadFavourite(IModelLayoutCommon)
Creates a new LoadFavourite command which has all favourites for this user as child commands
Declaration
public LoadFavourite(IModelLayoutCommon owner)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | owner | The owning context for this command |
LoadFavourite(IModelLayoutCommon, IFavourite)
Creates a new LoadFavourite command that when executed will load the specified IFavourite item
Declaration
public LoadFavourite(IModelLayoutCommon owner, IFavourite fav)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | owner | The owning context for this command |
IFavourite | fav | The favourite item to load and display when executed |
Properties
Description
The description of the favourite item to load
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
HasChildCommands
Returns true if this is the root command, otherwise false if it loads an individual favourite item
Declaration
public override bool HasChildCommands { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
IconID
The default icon associated with the favourite item to be loaded
Declaration
public override Guid IconID { get; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
ReloadChildrenOnEachOpen
True for the root command-Indicates the favourite child items should be reloaded each time the root command is activated
Declaration
public override bool ReloadChildrenOnEachOpen { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Title
The name of the favourite item to load
Declaration
public override string Title { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
InternalCanExecute(Object)
True - can open favourites
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | The command parameters |
Returns
Type | Description |
---|---|
System.Boolean | True |
Overrides
InternalExecuteAsync(Object)
Opens the favourite item and displays it to the user
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | The command parameter |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
Overrides
LoadChildrenAsync()
Loads all the favourite items from the cache and adds the as child LoadFavourite commands for each favourite item that can be loaded by the user
Declaration
public override Task LoadChildrenAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
Overrides
OpenFavourite(IModelLayoutCommon, IFavourite)
Opens the specified favourite item into the mainform
Declaration
public static Task OpenFavourite(IModelLayoutCommon owner, IFavourite fav)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | owner | The owning host to load the favourite item into |
IFavourite | fav | The favourite item to load |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |