Search Results for

    Show / Hide Table of Contents

    Class SwitchCanvas

    This command executes the SwitchCanvas system command

    Lists all canvases the user has access to, and the main system (no canvas), as child commands.

    Executing any will switch the users context to that canvas, or main system, and perform a RefreshAll to run the system in that new canvas
    Inheritance
    object
    BaseHasChildren<EPCommandWithDescriptor>
    EPCommand
    EPCommandWithDescriptor
    SwitchCanvas
    Implements
    IHasChildren<EPCommandWithDescriptor>
    IHasChildren
    IDisposable
    IEPCommandWithDescriptor
    IEPCommand
    ICommand
    ICommandDescriptor
    Inherited Members
    EPCommandWithDescriptor.OverlayIconID
    EPCommandWithDescriptor.Type
    EPCommandWithDescriptor.ToolTip
    EPCommandWithDescriptor.Parameter
    EPCommandWithDescriptor.HelpURL
    EPCommand.OnCanExecuteChanged()
    EPCommand.SetToggler(IHasToggleStatus)
    EPCommand.OnLayoutsChanged(IModelLayoutHost, LayoutChangeEventArgs)
    EPCommand.ExternalExecute(object)
    EPCommand.InternalExecute(object)
    EPCommand.ExternalCanExecute(object)
    EPCommand.InternalCanExecuteAsync(object)
    EPCommand.GetModifierText(IEPCommand)
    EPCommand.RemoveEventHandlersOnDispose()
    EPCommand.Dispose(bool)
    EPCommand.Dispose()
    EPCommand.RootController
    EPCommand.ActiveDisplayerFromOwner
    EPCommand.ReloadChildrenOnEachOpen
    EPCommand.SubscribeToLayoutChange
    EPCommand.From
    EPCommand.LockExecution
    EPCommand.CustomType
    EPCommand.Key
    EPCommand.ModifierKeys
    EPCommand.Owner
    EPCommand.Toggler
    EPCommand.IsQuickAccessCommand
    EPCommand.CanExecuteChanged
    BaseHasChildren<EPCommandWithDescriptor>.AddChild(EPCommandWithDescriptor, bool)
    BaseHasChildren<EPCommandWithDescriptor>.DeleteChild(EPCommandWithDescriptor)
    BaseHasChildren<EPCommandWithDescriptor>.ClearChildren()
    BaseHasChildren<EPCommandWithDescriptor>.ClearMyParent()
    BaseHasChildren<EPCommandWithDescriptor>.AddChild(IHasChildren)
    BaseHasChildren<EPCommandWithDescriptor>.DeleteChild(IHasChildren)
    BaseHasChildren<EPCommandWithDescriptor>.Order
    BaseHasChildren<EPCommandWithDescriptor>.Children
    BaseHasChildren<EPCommandWithDescriptor>.Parent
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Commands
    Assembly: LemonEdge.ClientCore.dll
    Syntax
    [CommandDescriptorOptions(Command.SwitchCanvas, null)]
    public class SwitchCanvas : EPCommandWithDescriptor, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor

    Constructors

    SwitchCanvas(IRootController, IModelLayoutCommon)

    Creates a new SwitchCanvas command which will have all canvases, and the main system, as child commands

    Declaration
    public SwitchCanvas(IRootController root, IModelLayoutCommon owner)
    Parameters
    Type Name Description
    IRootController root

    The root controller, for service access.

    IModelLayoutCommon owner

    The owning context for this command

    SwitchCanvas(IRootController, IModelLayoutCommon, ICanvas)

    Creates a new SwitchCanvas that will switch the system into running under the specified canvas

    Declaration
    protected SwitchCanvas(IRootController root, IModelLayoutCommon owner, ICanvas canvas)
    Parameters
    Type Name Description
    IRootController root

    The root controller, for service access.

    IModelLayoutCommon owner

    The owning context for this command

    ICanvas canvas

    The canvas the system will switch to running under

    SwitchCanvas(IRootController, IModelLayoutCommon, bool)

    Creates a new SwitchCanvas command which will switch the system into the main system - no canvas

    Declaration
    protected SwitchCanvas(IRootController root, IModelLayoutCommon owner, bool reset)
    Parameters
    Type Name Description
    IRootController root

    The root controller, for service access.

    IModelLayoutCommon owner

    The owning context for this command

    bool reset

    Indicates to switch into the main system

    Properties

    Description

    A user friendly description of this command

    Declaration
    public override string Description { get; }
    Property Value
    Type Description
    string
    Overrides
    EPCommandWithDescriptor.Description

    HasChildCommands

    True if this is the root command that lists all accessible canvases and the main system

    Declaration
    public override bool HasChildCommands { get; }
    Property Value
    Type Description
    bool
    Overrides
    EPCommand.HasChildCommands

    IconID

    The image to use for this command, either a ImageType or ImageID

    Declaration
    public override Guid IconID { get; }
    Property Value
    Type Description
    Guid
    Overrides
    EPCommandWithDescriptor.IconID

    Title

    The title of this command

    Declaration
    public override string Title { get; }
    Property Value
    Type Description
    string
    Overrides
    EPCommandWithDescriptor.Title

    Methods

    InternalCanExecute(object)

    True if the owning host is the main form application instance

    Declaration
    public override bool InternalCanExecute(object parameter)
    Parameters
    Type Name Description
    object parameter

    The command parameter

    Returns
    Type Description
    bool

    True if the owning host is the main form application instance

    Overrides
    EPCommand.InternalCanExecute(object?)

    InternalExecuteAsync(object)

    Switches running the system into the specified canvas, or main system (no canvas), for this command

    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 this operation

    Overrides
    EPCommand.InternalExecuteAsync(object)

    LoadChildrenAsync()

    Loads all the canvases this user has access to run in, along with the main system

    Declaration
    public override Task LoadChildrenAsync()
    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Overrides
    EPCommand.LoadChildrenAsync()

    Switch(IModelLayoutCommon, ICanvas, bool)

    Switch the users context to the specified canvas, or main system, and perform a RefreshAll to run the system in that new canvas

    Declaration
    public static Task Switch(IModelLayoutCommon owner, ICanvas canvas, bool reset)
    Parameters
    Type Name Description
    IModelLayoutCommon owner

    The owning host this command runs within

    ICanvas canvas

    The canvas to switch running the system into. Can be null if switching to the main system.

    bool reset

    If true then will switch the system into running under the main system - no canvas

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Implements

    IHasChildren<T>
    IHasChildren
    IDisposable
    IEPCommandWithDescriptor
    IEPCommand
    ICommand
    ICommandDescriptor

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    CommandExtensions.CreateCommand(EPCommand, ICommandDescriptor, CommandButtonType, bool, CommandSize)
    CommandExtensions.UpdateCommand(EPCommand, object, ICommandDescriptor, bool, CommandSize)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.