-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainForm.Designer.cs
More file actions
353 lines (347 loc) · 16.7 KB
/
MainForm.Designer.cs
File metadata and controls
353 lines (347 loc) · 16.7 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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
namespace PortFail2Ban
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.tbTop = new System.Windows.Forms.ToolStrip();
this.lblPort = new System.Windows.Forms.ToolStripLabel();
this.tbPort = new System.Windows.Forms.ToolStripTextBox();
this.lblGate = new System.Windows.Forms.ToolStripLabel();
this.tbGate = new System.Windows.Forms.ToolStripTextBox();
this.lblBanDuration = new System.Windows.Forms.ToolStripLabel();
this.tbBanDuration = new System.Windows.Forms.ToolStripTextBox();
this.lblClean = new System.Windows.Forms.ToolStripLabel();
this.tbClean = new System.Windows.Forms.ToolStripTextBox();
this.tbWhiteList = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.btnStart = new System.Windows.Forms.ToolStripButton();
this.btnStop = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.tbInstall = new System.Windows.Forms.ToolStripButton();
this.tbUninstall = new System.Windows.Forms.ToolStripButton();
this.ilList = new System.Windows.Forms.ImageList(this.components);
this.lvData = new System.Windows.Forms.ListView();
this.chStatus = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chIP = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chStartTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chLastActive = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chPorts = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tmrUI = new System.Windows.Forms.Timer(this.components);
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.tbAbout = new System.Windows.Forms.ToolStripButton();
this.tbTop.SuspendLayout();
this.SuspendLayout();
//
// tbTop
//
this.tbTop.BackColor = System.Drawing.Color.Transparent;
this.tbTop.GripMargin = new System.Windows.Forms.Padding(0);
this.tbTop.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.tbTop.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.lblPort,
this.tbPort,
this.lblGate,
this.tbGate,
this.lblBanDuration,
this.tbBanDuration,
this.lblClean,
this.tbClean,
this.tbWhiteList,
this.toolStripSeparator1,
this.btnStart,
this.btnStop,
this.toolStripSeparator2,
this.tbInstall,
this.tbUninstall,
this.toolStripSeparator3,
this.tbAbout});
this.tbTop.Location = new System.Drawing.Point(0, 0);
this.tbTop.Name = "tbTop";
this.tbTop.Padding = new System.Windows.Forms.Padding(0);
this.tbTop.Size = new System.Drawing.Size(1146, 40);
this.tbTop.TabIndex = 2;
//
// lblPort
//
this.lblPort.Name = "lblPort";
this.lblPort.Size = new System.Drawing.Size(32, 37);
this.lblPort.Text = "Port";
//
// tbPort
//
this.tbPort.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.tbPort.Name = "tbPort";
this.tbPort.Size = new System.Drawing.Size(50, 40);
this.tbPort.Text = "3389";
this.tbPort.ToolTipText = "The port number will be protect, for remote desktop is 3389.\r\n待保护的端口,默认远程桌面3389端口" +
"";
//
// lblGate
//
this.lblGate.Name = "lblGate";
this.lblGate.Size = new System.Drawing.Size(35, 37);
this.lblGate.Text = "Limit";
//
// tbGate
//
this.tbGate.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.tbGate.Name = "tbGate";
this.tbGate.Size = new System.Drawing.Size(40, 40);
this.tbGate.Text = "4";
this.tbGate.ToolTipText = "How many connections allow before block.\r\n黑客连接多少次后自动封锁对应IP。";
//
// lblBanDuration
//
this.lblBanDuration.Name = "lblBanDuration";
this.lblBanDuration.Size = new System.Drawing.Size(112, 37);
this.lblBanDuration.Text = "Block duration(m)";
//
// tbBanDuration
//
this.tbBanDuration.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.tbBanDuration.Name = "tbBanDuration";
this.tbBanDuration.Size = new System.Drawing.Size(40, 40);
this.tbBanDuration.Text = "120";
this.tbBanDuration.ToolTipText = "封锁后,多久解封该IP";
//
// lblClean
//
this.lblClean.Name = "lblClean";
this.lblClean.Size = new System.Drawing.Size(102, 37);
this.lblClean.Text = "Clean period(m)";
//
// tbClean
//
this.tbClean.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.tbClean.Name = "tbClean";
this.tbClean.Size = new System.Drawing.Size(40, 40);
this.tbClean.Text = "10";
this.tbClean.ToolTipText = "Reset IP connection info after given period(minute)\r\n对于正常连接的IP,多久后复位连接信息,单位分钟。";
//
// tbWhiteList
//
this.tbWhiteList.Image = ((System.Drawing.Image)(resources.GetObject("tbWhiteList.Image")));
this.tbWhiteList.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbWhiteList.Name = "tbWhiteList";
this.tbWhiteList.Size = new System.Drawing.Size(43, 37);
this.tbWhiteList.Text = "&Allow";
this.tbWhiteList.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.tbWhiteList.ToolTipText = "White list IP for incoming connections";
this.tbWhiteList.Click += new System.EventHandler(this.tbWhiteList_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 40);
//
// btnStart
//
this.btnStart.Image = ((System.Drawing.Image)(resources.GetObject("btnStart.Image")));
this.btnStart.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(39, 37);
this.btnStart.Text = "&Start";
this.btnStart.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// btnStop
//
this.btnStop.Enabled = false;
this.btnStop.Image = ((System.Drawing.Image)(resources.GetObject("btnStop.Image")));
this.btnStop.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(39, 37);
this.btnStop.Text = "S&top";
this.btnStop.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 40);
//
// tbInstall
//
this.tbInstall.Image = ((System.Drawing.Image)(resources.GetObject("tbInstall.Image")));
this.tbInstall.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbInstall.Name = "tbInstall";
this.tbInstall.Size = new System.Drawing.Size(46, 37);
this.tbInstall.Text = "&Install";
this.tbInstall.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.tbInstall.ToolTipText = "Install as Windows service\r\nOnce installed success, please close window and \r\nsta" +
"rt service by Windows services manager or reboot system";
this.tbInstall.Click += new System.EventHandler(this.tbInstall_Click);
//
// tbUninstall
//
this.tbUninstall.Image = ((System.Drawing.Image)(resources.GetObject("tbUninstall.Image")));
this.tbUninstall.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbUninstall.Name = "tbUninstall";
this.tbUninstall.Size = new System.Drawing.Size(44, 37);
this.tbUninstall.Text = "&Unin..";
this.tbUninstall.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.tbUninstall.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.tbUninstall.ToolTipText = "Uninstall Windows service";
this.tbUninstall.Click += new System.EventHandler(this.tbUninstall_Click);
//
// ilList
//
this.ilList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilList.ImageStream")));
this.ilList.TransparentColor = System.Drawing.Color.Transparent;
this.ilList.Images.SetKeyName(0, "Connect_16x.png");
this.ilList.Images.SetKeyName(1, "StatusInvalid_16x.png");
this.ilList.Images.SetKeyName(2, "EnableLog_16x.png");
//
// lvData
//
this.lvData.AutoArrange = false;
this.lvData.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chStatus,
this.chIP,
this.chCount,
this.chStartTime,
this.chLastActive,
this.chTime,
this.chPorts});
this.lvData.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvData.FullRowSelect = true;
this.lvData.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.lvData.HideSelection = false;
this.lvData.Location = new System.Drawing.Point(0, 40);
this.lvData.Name = "lvData";
this.lvData.Size = new System.Drawing.Size(1146, 520);
this.lvData.SmallImageList = this.ilList;
this.lvData.TabIndex = 3;
this.lvData.UseCompatibleStateImageBehavior = false;
this.lvData.View = System.Windows.Forms.View.Details;
this.lvData.VirtualMode = true;
this.lvData.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.lvData_RetrieveVirtualItem);
//
// chStatus
//
this.chStatus.Text = "";
this.chStatus.Width = 20;
//
// chIP
//
this.chIP.Text = "IP Address";
this.chIP.Width = 120;
//
// chCount
//
this.chCount.Text = "Count";
//
// chStartTime
//
this.chStartTime.Text = "First Time";
this.chStartTime.Width = 120;
//
// chLastActive
//
this.chLastActive.Text = "Last Active";
this.chLastActive.Width = 120;
//
// chTime
//
this.chTime.Text = "Block at";
this.chTime.Width = 120;
//
// chPorts
//
this.chPorts.Text = "Ports history";
this.chPorts.Width = 542;
//
// tmrUI
//
this.tmrUI.Interval = 1000;
this.tmrUI.Tick += new System.EventHandler(this.tmrUI_Tick);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(6, 40);
//
// tbAbout
//
this.tbAbout.Image = ((System.Drawing.Image)(resources.GetObject("tbAbout.Image")));
this.tbAbout.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tbAbout.Name = "tbAbout";
this.tbAbout.Size = new System.Drawing.Size(46, 37);
this.tbAbout.Text = "&Eww...";
this.tbAbout.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.tbAbout.Click += new System.EventHandler(this.tbAbout_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1146, 560);
this.Controls.Add(this.lvData);
this.Controls.Add(this.tbTop);
this.DoubleBuffered = true;
this.Name = "MainForm";
this.Text = "Port Fail2Ban";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.SizeChanged += new System.EventHandler(this.MainForm_SizeChanged);
this.tbTop.ResumeLayout(false);
this.tbTop.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolStrip tbTop;
private System.Windows.Forms.ToolStripLabel lblPort;
private System.Windows.Forms.ToolStripTextBox tbPort;
private System.Windows.Forms.ToolStripButton btnStart;
private System.Windows.Forms.ToolStripButton btnStop;
private System.Windows.Forms.ImageList ilList;
private System.Windows.Forms.ToolStripLabel lblBanDuration;
private System.Windows.Forms.ToolStripTextBox tbBanDuration;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ListView lvData;
private System.Windows.Forms.ColumnHeader chStatus;
private System.Windows.Forms.ColumnHeader chIP;
private System.Windows.Forms.ColumnHeader chTime;
private System.Windows.Forms.ColumnHeader chCount;
private System.Windows.Forms.Timer tmrUI;
private System.Windows.Forms.ColumnHeader chStartTime;
private System.Windows.Forms.ColumnHeader chPorts;
private System.Windows.Forms.ColumnHeader chLastActive;
private System.Windows.Forms.ToolStripLabel lblClean;
private System.Windows.Forms.ToolStripTextBox tbClean;
private System.Windows.Forms.ToolStripLabel lblGate;
private System.Windows.Forms.ToolStripTextBox tbGate;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripButton tbInstall;
private System.Windows.Forms.ToolStripButton tbUninstall;
private System.Windows.Forms.ToolStripButton tbWhiteList;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripButton tbAbout;
}
}