Page History
...
| Panel | ||
|---|---|---|
| ||
Variable <= *New --- Fully qualified class name ------------------ > |
...
| Panel | ||
|---|---|---|
| ||
RDML Variable . .NET Property Name ----------------------------------------------- > |
...
| Panel | ||
|---|---|---|
| ||
RDML Variable . Method Name ----------------------------------------------- > |
Example
C#
public void
IncrementDateByDays(
ref DateTime dateTime,
int dayAdjustment
...
)
{
dateTime = dateTime.AddDays( dayAdjustment );
...
}
RDML
Define_Com Class(#DOTNET1.TestClasses.MyClass) Name(#LClass01)
Define Field(#LDat01) Type(*DATETIME)
Define Field(#LDat02) Type(*DATETIME)
...
#LDat01 := '1954-04-25 10:04:00.000000'
#LDat02 := '1954-05-05 10:04:00.000000'
#LClass01.IncrementDateByDays( #LDat01 10 )
If ((#LDat01 = #LDat02))
…
Endif
C#
...
public String
DoubleIntegerReturnString(
int number,
out int result )
{
result = number * 2;
return String.Format( "Double
...
{0
...
} is
...
{1
...
}", number, result );
...
}
RDML
Define_Com Class(#DOTNET1.TestClasses.MyClass) Name(#LClass01)
Define Field(#LNum01) Type(*INT) Length(4)
Define Field(#LNum02) Type(*INT) Length(4)
Define Field(#LStr01) Type(*CHAR) Length(80)
#LNum01 :=
...
411
#LStr01 := #LClass4101.DoubleIntegerReturnString( #LNum01 #LNum02 )
If (#LNum02 = (#LNum01 * 2))
…
...
Endif
Event Handling
Event handling functions are defined using the EVTROUTINE command. See the [<span style="color: #0000ee"><span style="text-decoration: underline; ">EVTROUTINE</span></span>|../../../lansa015/Content/lansa/evtroutine.htm] documentation in the Technical Reference Guide for further details EVTROUTINE documentation in the Technical Reference Guide for further details about this command. The basic syntax of the command is as follows:
| Panel | ||
|---|---|---|
| ||
EVTROUTINE --- HANDLING ( Variable Name . Event Name )------------ > |
...
------------ > |
Example
C# public class EventArgs1 \{ private String mName; public EventArgs1() \{ \} public String Name \{ get \{ return mName; \} set \{ mName = value; \} \} \} Public class EventTests \{ public event MyEventDelegate MyEvent; public delegate void MyEventDelegate( String str, EventArgs1 eventArgs ); \} RDML Define_Com Class(#DOTNET1.TestClasses.EventTests) Name(#EventTest) Evtroutine Handling(#EventTest.MyEvent) Str(#s1) EventArgs(#c1) #STD_TEXT := #s1 #STD_NAME := #c1.Name Endroutine [<span style="color: #0000ee"><span style="text-decoration: underline; ">&<img src="../resources/images/opentoc-dark.png" title="Open Contents List" border="0"&></span></span>|../../index.htm#lansa/l4wdev07_0390.htm]