Class GetUniqueID
A view command that opens a prompt for viewing and editing a Guid value, as a string. For example:
Guid myNewID = Guid.Empty;
var updateID = new GetUniqueID(View.Displayer,
() => myNewID,
(newID) => myNewID = newID,
() => CurrentDisplayedItem != null,
new LemonEdge.Core.Client.CommandDecriptor("Update ID", ImageType.UniqueID, "Update image unique reference ID.", ImageType.Image));
Inheritance
System.Object
GetUniqueID
Implements
System.IDisposable
System.Windows.Input.ICommand
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: LemonEdge.Client.Core.Commands.ViewCommands
Assembly: ClientCore.dll
Syntax
public class GetUniqueID : ViewCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
GetUniqueID(IModelLayoutDisplayer, Func<Nullable<Guid>>, Action<Guid>, Func<Boolean>, ICommandDescriptor)
Creates a new GetUniqueID command
Declaration
public GetUniqueID(IModelLayoutDisplayer owner, Func<Guid?> getData, Action<Guid> setData, Func<bool> canExecute, ICommandDescriptor descriptor)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutDisplayer | owner | The owning host context for this command |
System.Func<System.Nullable<System.Guid>> | getData | A function that returns the initial Guid value to be displayed to the user |
System.Action<System.Guid> | setData | A method that is called with the changed Guid value when the user accepts any changes |
System.Func<System.Boolean> | canExecute | A function that indicates if this command can be executed or not |
ICommandDescriptor | descriptor | A descriptor to use for the title, icone, etc and other attributes of this command |
Properties
Description
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
OverlayIconID
Declaration
public override Guid? OverlayIconID { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
Overrides
Title
Declaration
public override string Title { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ToolTip
Declaration
public override string ToolTip { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
InternalCanExecute(Object)
Returns if this command can be executed or not
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | The command parameter |
Returns
Type | Description |
---|---|
System.Boolean | True if this command can be executed |
Overrides
InternalExecuteAsync(Object)
Displays a prompt to the user with a guid value that can be edited by 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
Implements
System.IDisposable
System.Windows.Input.ICommand