#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private ButtonClipboard As Button
Private TextArea1 As TextArea
Private ButtonSwap As Button
Private TextArea2 As TextArea
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
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
Sub ButtonClipboard_Click
TextArea1.Text = fx.Clipboard.GetString()
End Sub
Sub ButtonSwap_Click
Dim LineBreak As String = CRLF 'Chr(13) & Chr(10)
Dim Rows() As String
Rows = Regex.Split(LineBreak, TextArea1.Text)
TextArea2.Text = ""
For Each Row As String In Rows
If Row.Contains("=") Then
Dim Components() As String
Components = Regex.Split("=", Row)
TextArea2.Text = TextArea2.Text & Components(1) & "=" & Components(0) & LineBreak
Else
TextArea2.Text = TextArea2.Text & Row & LineBreak
End If
Next
fx.Clipboard.SetString(TextArea2.Text)
End Sub