--Xolotl Studio
--Created by Ymmanuel Flores
--Copyright 2018 Crowdorchestra SAPI de CV. All rights reserved.
--HHConnect v 1.0.0.4

try(DestroyDialog HHLiveLink)catch()
Rollout HHLiveLink "Hedghehog Connect"(
	edittext port_text "Port: " fieldWidth:50 text:"8080"
	button btn_openConnection "Start Listening"
	on btn_openConnection pressed do(

		if sme.GetNumViews() == 0 then(
			sme.Open()
			sme.Close()
		)

		btn_openConnection.enabled = false
		execute ("hedgehogConnect " + port_text.text)
	)
)
CreateDialog HHLiveLink
