Table of Contents

Class EventPort

Namespace
RDCore.Forms.Porting
Assembly
RDCore.Forms.dll

How a legacy event handler ports to RDForms: the event's RDForms name and the handler's RDForms parameters.

public sealed record EventPort : IEquatable<EventPort>
Inheritance
EventPort
Implements
Inherited Members

Constructors

EventPort(string, string, string, IReadOnlyList<ParameterPort>, bool, PortDiagnostic?)

How a legacy event handler ports to RDForms: the event's RDForms name and the handler's RDForms parameters.

public EventPort(string LegacyClass, string LegacyName, string RDFormsName, IReadOnlyList<ParameterPort> Parameters, bool CoordinatesInLegacyUnit, PortDiagnostic? Note)

Parameters

LegacyClass string

The legacy class that raises the event, without the library, such as TextBox. An event every control raises with the same parameters is on ExtenderClass.

LegacyName string

The event's legacy name, such as Exit.

RDFormsName string

The RDForms event the handler is renamed to, such as Validate. It is LegacyName for an event that keeps its name.

Parameters IReadOnlyList<ParameterPort>

The handler's parameters, in order, each with its legacy and its RDForms declaration. A parameter the legacy handler does not declare (IsAdded) follows the ones it does.

CoordinatesInLegacyUnit bool

Whether the event's X and Y are in the legacy unit: LegacyUnit for MSForms, the container's scale for VB6. RDForms raises them in twips, and a form's own in its scale. Where the legacy code expects another unit, as MSForms code expects points, the code port gives the handler two first lines that convert them, and its body runs as written.

Note PortDiagnostic

What the code port reports at each handler it ports, where RDForms raises the event differently, or null.

Properties

CoordinatesInLegacyUnit

Whether the event's X and Y are in the legacy unit: LegacyUnit for MSForms, the container's scale for VB6. RDForms raises them in twips, and a form's own in its scale. Where the legacy code expects another unit, as MSForms code expects points, the code port gives the handler two first lines that convert them, and its body runs as written.

public bool CoordinatesInLegacyUnit { get; init; }

Property Value

bool

IsRenamed

Whether the event's RDForms name differs from its legacy name, compared without regard to case.

public bool IsRenamed { get; }

Property Value

bool

LegacyClass

The legacy class that raises the event, without the library, such as TextBox. An event every control raises with the same parameters is on ExtenderClass.

public string LegacyClass { get; init; }

Property Value

string

LegacyName

The event's legacy name, such as Exit.

public string LegacyName { get; init; }

Property Value

string

Note

What the code port reports at each handler it ports, where RDForms raises the event differently, or null.

public PortDiagnostic? Note { get; init; }

Property Value

PortDiagnostic

Parameters

The handler's parameters, in order, each with its legacy and its RDForms declaration. A parameter the legacy handler does not declare (IsAdded) follows the ones it does.

public IReadOnlyList<ParameterPort> Parameters { get; init; }

Property Value

IReadOnlyList<ParameterPort>

RDFormsName

The RDForms event the handler is renamed to, such as Validate. It is LegacyName for an event that keeps its name.

public string RDFormsName { get; init; }

Property Value

string