Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim light As Yeelight
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("main") 'Load the layout file.
MainForm.Show
light.Initialize(Me,"yee")
light.Connect("192.168.178.20")
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 yee_Connected(Successful As Boolean)
If Successful then
light.setPower(True,500)
light.setColorFlow(0,1,"1000,2,2700,100,500,1,255,10,5000,7,0,0,500,2,5000,1")
end if
End Sub
Sub yee_Response(Message As String)
Log(Message)
End Sub