Appendix – Lenze VisiWinNet VisiWinNET Smart Benutzerhandbuch

Seite 259

Advertising
background image

Appendix

Scripts

Example functions

6

l

259

SHP−VWNS DE/EN 6.1

Output information for checking

In order to facilitate diagnostics in spite of the missing debugger, VisiWinNET

â

Smart

diverts standard outputs to the output window. Standard outputs are shown line by line
via the command Console.WriteLine.

Dim i As Integer = 21
Console.WriteLine("Hello World, the answer is: " & i * 2)

The output is displayed in the output window of VisiWinNET

â

Smart.

Under Windows CE, the following code must be used:

Private i As Integer = 0

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
#if DEBUG
Console.WriteLine("TimerTick: " & i)
i = i + 1
#End If
End Sub

The Compiler switch can be set under Design\Configuration\Build.

Reading texts from the language switching

Via the types in the name area "LanguageSwitching" the information from the language
switching can be obtained. This also includes the reading of individual texts.

Dim s As String =_
VisiWinNET.LanguageSwitching.Localization.GetText("@FCentral.MyText")

In the language switching editor, a text group "FCentral" was created, and within it a text
called "MyText". After the function call the text is provided in the language currently set
in the project in variable "s".

Advertising