-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPanelWindowView.cs
More file actions
198 lines (175 loc) · 5.54 KB
/
PanelWindowView.cs
File metadata and controls
198 lines (175 loc) · 5.54 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
namespace TinyPanel
{
using Terminal.Gui;
public partial class MyView : Window
{
private Label uptimeLabel;
private TextField banIdField;
private Button banButton;
private TextField notifyField;
private Button notifyButton;
private Label chatsListLabel;
private ListView chatsList;
private Label logLabel;
private ListView logList;
private Button startOrStopButton;
private Button restartButton;
private Button updateCodeButton;
private Button resetCacheButton;
private FrameView chatsFrame;
private FrameView logFrame;
private void InitializeComponent()
{
Width = Dim.Fill(0);
Height = Dim.Fill(0);
X = 0;
Y = 0;
Modal = false;
Text = "";
Border.BorderStyle = BorderStyle.Single;
Border.Effect3D = false;
Border.DrawMarginFrame = true;
TextAlignment = TextAlignment.Left;
Title = "TinyPanel NURE bot";
uptimeLabel = new Label()
{
Width = 10,
Height = 1,
X = 1,
Y = Pos.Top(this),
Data = "fetchLabel",
Text = "Uptime: 12:32:27",
TextAlignment = TextAlignment.Left
};
banIdField = new TextField()
{
Width = 20,
Height = 1,
X = 1,
Y = Pos.Top(this) + 1,
Data = "banId",
Text = "Введіть ID",
TextAlignment = TextAlignment.Left
};
banButton = new Button()
{
Width = 12,
X = 23,
Y = Pos.Top(this) + 1,
Data = "banButton",
Text = "Бан",
TextAlignment = TextAlignment.Centered
};
notifyField = new TextField()
{
Width = 20,
Height = 1,
X = 1,
Y = Pos.Top(this) + 3,
Data = "notify",
Text = "Введіть повідомлення",
TextAlignment = TextAlignment.Left
};
notifyButton = new Button()
{
Width = 12,
X = 23,
Y = Pos.Top(this) + 3,
Data = "notifyButton",
Text = "Відправити",
TextAlignment = TextAlignment.Centered
};
chatsListLabel = new Label()
{
Width = 10,
Height = 1,
X = 1,
Y = Pos.Top(this) + 5,
Data = "chatsLabel",
Text = "Список чатів:",
TextAlignment = TextAlignment.Left
};
chatsFrame = new FrameView()
{
Width = 50,
Height = 15,
X = 0,
Y = 6,
Data = "chatsFrame",
TextAlignment = TextAlignment.Left
};
logLabel = new Label()
{
Width = 10,
Height = 1,
X = 52,
Y = 0,
Data = "logLabel",
Text = "Журнал:",
TextAlignment = TextAlignment.Left
};
logFrame = new FrameView()
{
Width = 50,
Height = 20,
X = 51,
Y = 1,
Data = "logFrame",
TextAlignment = TextAlignment.Left
};
startOrStopButton = new Button()
{
Width = 12,
X = Pos.Left(this),
Y = Pos.Bottom(this) - 3,
Data = "startOrStopButton",
Text = "Ввімкнути",
TextAlignment = TextAlignment.Centered,
IsDefault = false
};
restartButton = new Button()
{
Width = 12,
X = Pos.Left(this) + 15,
Y = Pos.Bottom(this) - 3,
Data = "restartButton",
Text = "Перезавантажити",
TextAlignment = TextAlignment.Centered,
IsDefault = false
};
updateCodeButton = new Button()
{
Width = 12,
X = Pos.Left(this) + 36,
Y = Pos.Bottom(this) - 3,
Data = "updateCodeButton",
Text = "Оновити код",
TextAlignment = TextAlignment.Centered,
IsDefault = false
};
resetCacheButton = new Button()
{
Width = 12,
X = Pos.Left(this) + 53,
Y = Pos.Bottom(this) - 3,
Data = "resetCacheButton",
Text = "Скинути кеш",
TextAlignment = TextAlignment.Centered,
IsDefault = false
};
Add(uptimeLabel);
Add(banIdField);
Add(banButton);
Add(notifyField);
Add(notifyButton);
Add(chatsListLabel);
Add(chatsFrame);
Add(logLabel);
Add(logFrame);
Add(startOrStopButton);
Add(restartButton);
Add(updateCodeButton);
Add(resetCacheButton);
}
}
}