1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-04-22 15:37:39 +08:00
parent 30c457bb07
commit eea57c28a4

View File

@ -1,32 +0,0 @@
package wind
import (
"runtime"
"shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/cli"
"github.com/rodrigocfd/windigo/ui"
"github.com/rodrigocfd/windigo/win"
)
type wind struct {
ice.Hash
list string `name:"list hash auto"`
}
func (s wind) List(m *ice.Message, arg ...string) {
m.Echo("hello world")
}
func init() { ice.ChatCtxCmd(wind{}) }
func Run(arg ...string) string {
go func() { ice.Runs(func() {}, "serve", "start") }()
runtime.LockOSThread()
wnd := ui.NewWindowMain(ui.WindowMainOpts().Title("Contexts").ClientArea(win.SIZE{Cx: 340, Cy: 80}))
btnShow := ui.NewButton(wnd, ui.ButtonOpts().Text("&Open").Position(win.POINT{X: 0, Y: 0}))
btnShow.On().BnClicked(func() { ice.Pulse.Cmd(cli.SYSTEM, "explorer", "http://localhost:9020") })
wnd.RunAsMain()
return ""
}