-
Notifications
You must be signed in to change notification settings - Fork 23
/
dialog_windows_ui.go
95 lines (81 loc) · 1.98 KB
/
dialog_windows_ui.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// This file was created by ui2walk and may be regenerated.
// DO NOT EDIT OR YOUR MODIFICATIONS WILL BE LOST!
//+build windows
package main
import (
"github.com/lxn/walk"
)
type mainDialogUI struct {
centralwidget *walk.Composite
rconOutput *walk.TextEdit
rconInput *walk.LineEdit
}
func (w *mainDialog) init() (err error) {
if w.MainWindow, err = walk.NewMainWindow(); err != nil {
return err
}
succeeded := false
defer func() {
if !succeeded {
w.Dispose()
}
}()
var font *walk.Font
if font == nil {
font = nil
}
w.SetName("mainDialog")
l := walk.NewVBoxLayout()
if err := l.SetMargins(walk.Margins{0, 0, 0, 0}); err != nil {
return err
}
if err := w.SetLayout(l); err != nil {
return err
}
if err := w.SetClientSize(walk.Size{800, 560}); err != nil {
return err
}
if err := w.SetTitle(`IceCon`); err != nil {
return err
}
// centralwidget
if w.ui.centralwidget, err = walk.NewComposite(w); err != nil {
return err
}
w.ui.centralwidget.SetName("centralwidget")
verticalLayout := walk.NewVBoxLayout()
if err := w.ui.centralwidget.SetLayout(verticalLayout); err != nil {
return err
}
if err := verticalLayout.SetMargins(walk.Margins{9, 9, 9, 9}); err != nil {
return err
}
if err := verticalLayout.SetSpacing(6); err != nil {
return err
}
// rconOutput
if w.ui.rconOutput, err = walk.NewTextEdit(w.ui.centralwidget); err != nil {
return err
}
w.ui.rconOutput.SetName("rconOutput")
if font, err = walk.NewFont("Courier New", 8, 0); err != nil {
return err
}
w.ui.rconOutput.SetFont(font)
w.ui.rconOutput.SetReadOnly(true)
// rconInput
if w.ui.rconInput, err = walk.NewLineEdit(w.ui.centralwidget); err != nil {
return err
}
w.ui.rconInput.SetName("rconInput")
if font, err = walk.NewFont("Courier New", 8, 0); err != nil {
return err
}
w.ui.rconInput.SetFont(font)
if err := w.ui.rconInput.SetMinMaxSize(walk.Size{0, 0}, walk.Size{16777215, 21}); err != nil {
return err
}
// Tab order
succeeded = true
return nil
}