-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStatusForm.cs
More file actions
58 lines (52 loc) · 1.64 KB
/
StatusForm.cs
File metadata and controls
58 lines (52 loc) · 1.64 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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace LowEndViet.com_VPS_Tool
{
public partial class StatusForm : Form
{
List<LevCheckbox> levCheckboxList;
public StatusForm()
{
InitializeComponent();
this.MaximumSize = this.Size;
this.MinimumSize = this.Size;
}
public StatusForm(List<LevCheckbox> levCheckboxList)
{
InitializeComponent();
this.levCheckboxList = levCheckboxList;
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
public void updateProgress(string manualStatus = "")
{
if (this.rtbProgress.InvokeRequired)
{
DelegateUpdateProgress d = new DelegateUpdateProgress(updateProgress);
this.Invoke(d, manualStatus);
}
else
{
this.rtbProgress.Text = "";
foreach (LevCheckbox levCheckbox in levCheckboxList)
{
if (levCheckbox.checkBox.Checked)
{
this.rtbProgress.Text += levCheckbox.status + Environment.NewLine;
}
}
this.rtbProgress.Text += manualStatus;
this.rtbProgress.Update();
}
}
private delegate void DelegateUpdateProgress(string manualStatus);
}
}