Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim RVModels As List
Type RVstruct (Name As String,Length As Int, Width As Int)
Dim RVM(3) As RVstruct
End Sub
Sub AppStart (Form1 As Form, Args() As String)
' MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
' MainForm.Show
If File.Exists(File.DirApp, "ModelsList.txt") = False Then
RVModels.Initialize
RVM(0).Initialize
RVM(0).Name = "ModA"
RVM(0).Length = 185
RVM(0).Width = 96
RVM(1).Initialize
RVM(1).Name = "ModB"
RVM(1).Length = 225
RVM(1).Width = 95
RVM(2).Initialize
RVM(2).Name = "ModC"
RVM(2).Length = 250
RVM(2).Width = 94
For i = 0 To 2
RVModels.Add(RVM(i).Name &","& RVM(i).Length &","& RVM(i).Width)
Next
File.WriteList(File.DirApp, "ModelsList.txt", RVModels)
Else
Dim XM As RVstruct
Dim str() As String
RVModels.Initialize
XM.Initialize
RVModels = File.ReadList(File.DirApp, "ModelsList.txt")
str = Regex.Split(",",RVModels.Get(1))
XM.Name = str(0)
XM.Length = str(1)
XM.Width = str(2)
Log("Name = " & XM.Name)
Log("Length = " & XM.Length)
Log("Width = " & XM.Width)
End If
End Sub