| | |
| | | "kingdee-dbapi/config" |
| | | "kingdee-dbapi/kingdee" |
| | | "kingdee-dbapi/logger" |
| | | "kingdee-dbapi/nsqclient" |
| | | "kingdee-dbapi/report" |
| | | "kingdee-dbapi/static" |
| | | "kingdee-dbapi/webserver" |
| | | |
| | | "fyne.io/fyne/v2" |
| | | "fyne.io/fyne/v2/app" |
| | |
| | | FullScreen bool |
| | | } |
| | | |
| | | func NewDisplay() *Display { |
| | | func NewDisplay(dbConnectedChan chan bool) *Display { |
| | | a := app.New() |
| | | |
| | | // 设置图标 |
| | |
| | | // //myWindow.Close() |
| | | //}, |
| | | } |
| | | |
| | | var submitBtn *widget.Button |
| | | submitBtn = widget.NewButtonWithIcon("启动", theme.MailSendIcon(), func() { |
| | | config.Options.WebPort = strings.Trim(serverPort.Text, " ") |
| | |
| | | submitBtn.Text = "已启动" |
| | | submitBtn.Disable() |
| | | |
| | | report.Start() |
| | | |
| | | // 开启订阅SQL查询 |
| | | go nsqclient.InitNsqConsumer(config.Options.SqlQueryTopic, "sensor01", kingdee.SqlQueryHandle) |
| | | go nsqclient.InitNsqConsumer(config.Options.CSTQueryTopic, "sensor01", kingdee.CSTQueryHandle) |
| | | |
| | | go webserver.Serve(serverPort.Text) |
| | | dbConnectedChan <- true |
| | | }) |
| | | |
| | | content := container.New(layout.NewGridWrapLayout(fyne.NewSize(300, 200)), form) |