#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private txtData As TextArea
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Initialize("frm", 800, 800)
MainForm.RootPane.LoadLayout("vMain")
MainForm.Show
If Args.Length = 0 Then
Log("File Name is missing.")
Return
'ExitApplication
End If
'get the file name
Dim fName As String = Args(0)
jMash.InformUser("File Name",fName)
'read the contents
Dim contents As String = File.ReadString("",fName)
txtData.Text = contents
'New Page Content...
Dim npc As StringBuilder
npc.initialize
npc.append("Sub Process_Globals").Append(CRLF)
npc.Append("Private fx As JFX").Append(CRLF)
npc.Append("Private frm As Form").Append(CRLF)
npc.Append("End Sub").append(CRLF).Append(CRLF)
npc.Append("Sub Close").Append(CRLF)
npc.Append("frm.close").Append(CRLF)
npc.Append("End Sub").Append(CRLF)
npc.Append("Public Sub Show(ParentForm As Form)").Append(CRLF)
npc.append($"frm.Initialize("frm",400, 550)"$).Append(CRLF)
npc.append("frm.Resizable = False").Append(CRLF)
npc.Append($"frm.RootPane.LoadLayout("<Change>")"$).Append(CRLF)
npc.Append("frm.Title = <Change>").Append(CRLF)
npc.Append("frm.SetOwner(ParentForm)").Append(CRLF)
npc.Append("frm.ShowAndWait").append(CRLF)
npc.Append("End Sub").Append(CRLF)
txtData.Text = txtData.Text & CRLF & npc.tostring
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub