cloud-control-panel/example-UI-table/main.go

33 lines
585 B
Go

package main
import "log"
import "os"
import "time"
import "fmt"
import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"
func doGUI() {
ui.Main(setupUI)
log.Println("GUI exited. Not sure what to do here. os.Exit() ?")
os.Exit(0)
}
func main() {
go doGUI()
log.Println("Sleep for 3 seconds, then try to add a new tab")
time.Sleep(3 * 1000 * 1000 * 1000)
count := 0
for {
count += 1
tabname := fmt.Sprintf("test tab %d", count)
addTableTab(tabname, 4, "something")
log.Println("Sleep for 10 seconds")
time.Sleep(10 * 1000 * 1000 * 1000)
}
}