Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private ColorPicker1 As ColorPicker
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
'Load last selected color.
If File.Exists(File.DirApp,"color.txt") Then
Dim color As Int=File.ReadString(File.DirApp,"color.txt")
ColorPicker1.SelectedColor=fx.Colors.From32Bit(color)
End If
MainForm.Show
End Sub
Sub ColorPicker1_ValueChanged (Value As Paint)
'Save selected color
File.WriteString(File.DirApp,"color.txt",fx.Colors.To32Bit(Value))
End Sub