Class SwitchTheme
This command executes the Theme system command
Lists all themes the user has access to as child commands.
Switches the theme the current user is running in, and prompts if they want to quit the application and restart in order to load in the UI changesInheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: ClientCore.dll
Syntax
[CommandDescriptorOptions(Commands.Theme, null)]
public class SwitchTheme : EPCommandWithDescriptor, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
SwitchTheme(IModelLayoutCommon)
Creates a new SwitchTheme command that lists all themes the user has access to as child commands.
Declaration
public SwitchTheme(IModelLayoutCommon owner)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelLayoutCommon | owner | The owning context for this command |
SwitchTheme(IModelLayoutCommon, Theme)
Creates a new SwitchTheme command that switches the current theme to the specified one and prompts if they want to quit the application and restart in order to load in the UI changes
Declaration
public SwitchTheme(IModelLayoutCommon owner, Theme theme)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelLayoutCommon | owner | The owning context for this command |
| Theme | theme | The new theme to run the entire system under |
Properties
Description
Declaration
public override string Description { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Overrides
HasChildCommands
True if this is the root command listing all possible themes as children
Declaration
public override bool HasChildCommands { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
| Type | Description |
|---|---|
| System.Guid |
Overrides
Theme
The theme this command will switch to
Declaration
public Theme? Theme { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<Theme> |
Title
Declaration
public override string Title { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Overrides
Methods
InternalCanExecute(Object)
True if the command is running with an owner of the main application form
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | parameter | The command parameter |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the command is running with an owner of the main application form |
Overrides
InternalExecuteAsync(Object)
Switches the theme the current user is running in to the specified one, and prompts if they want to quit the application and restart in order to load in the UI changes
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
Switch(IModelLayoutCommon, Nullable<Theme>)
Switches the theme the current user is running in to the specified one, and prompts if they want to quit the application and restart in order to load in the UI changes
Declaration
public static Task Switch(IModelLayoutCommon owner, Theme? theme)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelLayoutCommon | owner | The owning context this command runs in |
| System.Nullable<Theme> | theme | The new theme to switch running the application under |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task indicating the completion of the operation |