forked from x/icebergs
opt some
This commit is contained in:
parent
30c457bb07
commit
eea57c28a4
@ -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 ""
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user