From eea57c28a41662f1beeb768f13d566f25acb2d0b Mon Sep 17 00:00:00 2001 From: shylinux Date: Mon, 22 Apr 2024 15:37:39 +0800 Subject: [PATCH] opt some --- misc/wind/wind.go | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 misc/wind/wind.go diff --git a/misc/wind/wind.go b/misc/wind/wind.go deleted file mode 100644 index 91cc0176..00000000 --- a/misc/wind/wind.go +++ /dev/null @@ -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 "" -}