-
Notifications
You must be signed in to change notification settings - Fork 0
/
base_mysql.go
52 lines (46 loc) · 868 Bytes
/
base_mysql.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// main
package main
import (
"time"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
)
func (my *Basemysql) Check() {
f, err := walk.NewFont("宋体", 12, walk.FontBold)
if err == nil {
my.Res.SetFont(f)
}
my.Res.SetText("准备安装")
for {
my.Res.AppendText("准备安装")
time.Sleep(1 * time.Second)
}
}
func run_basemysql(Mw *walk.MainWindow) {
defer my_recover()
in := &Basemysql{}
d := Dialog{
AssignTo: &in.Mw,
Title: "安装包安装",
MinSize: Size{900, 600},
Layout: VBox{MarginsZero: true},
Name: Getuuid(),
Children: []Widget{
TextEdit{
AssignTo: &in.Res,
ReadOnly: true,
VScroll: true,
MaxLength: 999999999,
},
},
}
if err := d.Create(Mw); err != nil {
return
}
go in.Check()
(*d.AssignTo).Run()
}
type Basemysql struct {
Mw *walk.Dialog
Res *walk.TextEdit
}