Search Results for

    Show / Hide Table of Contents

    Class ButtonSerializedParamController

    The controller for editing the ButtonViewParams in a popup single parameter window

    We do not need an associated IViewSerializedParamDefaultEditor implementation as this is a standard popup single parameter editor. We only need that if it has a custom editor

    Inheritance
    object
    PopupWindowController
    PopupWindowController<ButtonViewParams>
    ParamViewerController<ButtonViewParams>
    ParamSingleViewerController<ButtonViewParams>
    ButtonSerializedParamController
    Implements
    IPopupWindowController<ButtonViewParams>
    IParamViewerController
    IPopupWindowController
    IController
    Inherited Members
    ParamSingleViewerController<ButtonViewParams>.InitFromWindow(IPopupWindow<ButtonViewParams>)
    ParamSingleViewerController<ButtonViewParams>.Display()
    ParamSingleViewerController<ButtonViewParams>.Controls()
    ParamSingleViewerController<ButtonViewParams>.Host
    ParamSingleViewerController<ButtonViewParams>.SingleWindow
    ParamSingleViewerController<ButtonViewParams>.UIContext
    ParamSingleViewerController<ButtonViewParams>.ServiceContext
    ParamViewerController<ButtonViewParams>.SetParam(ButtonViewParams)
    ParamViewerController<ButtonViewParams>.OriginalParam
    PopupWindowController<ButtonViewParams>.OnOk(object)
    PopupWindowController<ButtonViewParams>.OnOk(ButtonViewParams)
    PopupWindowController<ButtonViewParams>.Validate(ButtonViewParams)
    PopupWindowController<ButtonViewParams>.OnCancel()
    PopupWindowController<ButtonViewParams>.OwningWindow
    PopupWindowController<ButtonViewParams>.Commands
    PopupWindowController<ButtonViewParams>.GetResult
    PopupWindowController.RootController
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Views.Params
    Assembly: LemonEdge.ClientCore.dll
    Syntax
    public class ButtonSerializedParamController : ParamSingleViewerController<ButtonViewParams>, IPopupWindowController<ButtonViewParams>, IParamViewerController, IPopupWindowController, IController

    Constructors

    ButtonSerializedParamController(IParamSingleViewer<ButtonViewParams>, ButtonViewParams)

    Creates a new ButtonViewParams controller

    Declaration
    public ButtonSerializedParamController(IParamSingleViewer<ButtonViewParams> window, ButtonViewParams param)
    Parameters
    Type Name Description
    IParamSingleViewer<ButtonViewParams> window

    The single popup param window this controller is for

    ButtonViewParams param

    The original parameter value to be displayed and edited by the user

    Methods

    AlterControlInfo(ControlDisplayInfo)

    Alters the ButtonID to provide a list of all valid command buttons

    Declaration
    protected override void AlterControlInfo(ControlDisplayInfo info)
    Parameters
    Type Name Description
    ControlDisplayInfo info

    The control to alter with additional settings

    Overrides
    LemonEdge.Client.UI.API.Controllers.ParamSingleViewerController<LemonEdge.Client.Core.Views.ButtonViewParams>.AlterControlInfo(LemonEdge.Client.UI.API.Controls.ControlDisplayInfo)

    AlterItemParameters(IModelLayoutCommon, Guid, string)

    Pops up a parameter window for the specified command with the specified serialized CommandSerializedParam

    Declaration
    public static Task<(bool Modified, string NewParams)> AlterItemParameters(IModelLayoutCommon host, Guid id, string serializedParams)
    Parameters
    Type Name Description
    IModelLayoutCommon host

    The context host this command operates within

    Guid id

    The unique global id of the command this should provide a popup parameter window for

    string serializedParams

    The serialized command parameter that inherits from CommandSerializedParam

    The UI must have a defined ParamSingleViewerController<T> for this command parameter type

    Returns
    Type Description
    Task<(bool IsValid, string ValidationFailureMessage)>

    A task holding if the user modified the parameters, and if they did what the new serialized parameters are

    ControlNames()

    Adds 3 controls: ButtonID, ButtonName, and ButtonTooltip

    Declaration
    protected override IEnumerable<ControlDisplayInfoLight> ControlNames()
    Returns
    Type Description
    IEnumerable<ControlDisplayInfoLight>

    A list of all controls to be shown for editing in this popup

    Overrides
    LemonEdge.Client.UI.API.Controllers.ParamSingleViewerController<LemonEdge.Client.Core.Views.ButtonViewParams>.ControlNames()

    InitCommands(IList<ViewCommand>)

    Adds an alter image command (ButtonIconID) and an alter custom button parameters command (ButtonParams)

    Declaration
    protected override void InitCommands(IList<ViewCommand> commands)
    Parameters
    Type Name Description
    IList<ViewCommand> commands

    The initial set of commands for this popup single parameter window

    Overrides
    PopupWindowController<ButtonViewParams>.InitCommands(IList<ViewCommand>)

    OnItemChanged(object, PropertyChangedEventArgs)

    Reacts to any change of the ButtonID by resetting the ButtonParams and providing default values for the name, tooltip and icon

    Declaration
    protected override void OnItemChanged(object sender, PropertyChangedEventArgs e)
    Parameters
    Type Name Description
    object sender

    The parameter that had its property changed

    PropertyChangedEventArgs e

    The property changed event arguments

    Overrides
    ParamSingleViewerController<ButtonViewParams>.OnItemChanged(object, PropertyChangedEventArgs)

    Implements

    IPopupWindowController<TResult>
    IParamViewerController
    IPopupWindowController
    IController

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    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.