Class Save
This command executes the Save system command
Saves any changes made against the active displayed layout, or specified layout, and refreshes the layout(s) when the save completes successfully
This also prompts the user with any custom save dialogs through IHasSaveProcessingTask implementations and tracks any tasks created during the save process so the user can see their progressInheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: LemonEdge.ClientCore.dll
Syntax
[CommandDescriptorOptions(Command.Save, null)]
public class Save : EPCommandWithDescriptor, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
Save(IRootController, IModelLayoutCommon)
Creates a new Save command
Declaration
public Save(IRootController root, IModelLayoutCommon owner)
Parameters
| Type | Name | Description |
|---|---|---|
| IRootController | root | The root controller, for service access. |
| IModelLayoutCommon | owner | The owning context for this command |
Save(IRootController, IModelLayoutCommon, bool)
Creates a new Save command
Declaration
protected Save(IRootController root, IModelLayoutCommon owner, bool saveAndClose)
Parameters
| Type | Name | Description |
|---|---|---|
| IRootController | root | The root controller, for service access. |
| IModelLayoutCommon | owner | The owning context for this command |
| bool | saveAndClose | Whether to close after |
Properties
Description
A user friendly description of this command
Declaration
public override string Description { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Overrides
Key
Indicates the command key to use for executing this from a keyboard command
Declaration
public override KeyboardKey Key { get; }
Property Value
| Type | Description |
|---|---|
| KeyboardKey |
Overrides
ModifierKeys
Indicates the modifier keys to be used with Key when executing this command from the keyboard
Declaration
public override KeyboardModifierKeys ModifierKeys { get; }
Property Value
| Type | Description |
|---|---|
| KeyboardModifierKeys |
Overrides
SubscribeToLayoutChange
Returns true indicating this command should respond to the current selected layout changing
Declaration
protected override bool SubscribeToLayoutChange { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Title
The title of this command
Declaration
public override string Title { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Methods
InternalCanExecute(object)
Returns true if the active, or specified, layout has pending changes and a save is currently being executed
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
| Type | Name | Description |
|---|---|---|
| object | parameter | The command parameter |
Returns
| Type | Description |
|---|---|
| bool | True if the active, or specified, layout has pending changes and a save is currently being executed |
Overrides
InternalExecuteAsync(object)
Saves any changes made against the active displayed layout, or specified layout, and refreshes the layout(s) when the save completes successfully
This also prompts the user with any custom save dialogs through IHasSaveProcessingTask implementations and tracks any tasks created during the save process so the user can see their progress
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
| Type | Name | Description |
|---|---|---|
| object | parameter | The command parameter |
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operation |
Overrides
SaveLayout(IModelLayoutDisplayer, bool)
Saves any changes made against the specified layout, and refreshes the layout(s) when the save completes successfully
This also prompts the user with any custom save dialogs through IHasSaveProcessingTask implementations and tracks any tasks created during the save process so the user can see their progress
Declaration
public static Task<bool> SaveLayout(IModelLayoutDisplayer layout, bool refreshAfter)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelLayoutDisplayer | layout | The specified layout to save the changes for |
| bool | refreshAfter | Indicates that once successfully saved the system should refresh the layout (and any others using that context) |
Returns
| Type | Description |
|---|---|
| Task<bool> | True if the save was successful |