cloud-control-panel/test4/main.go

46 lines
873 B
Go

package main
import "log"
import "time"
import "git.wit.com/wit/gui"
func main() {
gui.Data.ButtonClick = buttonClick
go gui.GoMainWindow()
watchGUI()
}
func buttonClick(i int, s string) {
log.Println("test4 buttonClick() i, s =", i, s)
gui.ShowAccountTab()
gui.Data.State = "account1 done"
}
func watchGUI() {
log.Println("Sleep(2000)")
time.Sleep(2000 * time.Millisecond)
for {
log.Println("Sleep()", gui.Data.State)
time.Sleep(200 * time.Millisecond)
if (gui.Data.State == "splash") {
log.Println("Display the splash box")
gui.Data.State = "done"
}
if (gui.Data.State == "kill") {
log.Println("gui.State = kill")
log.Println("gui.State = kill")
log.Println("gui.State = kill")
gui.Data.State = "account1"
}
if (gui.Data.State == "account1") {
log.Println("Display the splash box")
gui.Data.State = "done"
}
}
}