forked from chieunhatnang/VM-QuickConfig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLevCheckbox.cs
61 lines (55 loc) · 1.74 KB
/
LevCheckbox.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace LowEndViet.com_VPS_Tool
{
public class LevCheckbox
{
public CheckBox checkBox { get; set; }
public string status { get; set; }
public string command { get; set; }
public string softwareURL { get; set; }
public string setupFileName { get; set; }
public string remark { get; set; }
public LevCheckbox(CheckBox chk, string command)
{
this.checkBox = chk;
this.command = command;
this.status = checkBox.Text + " >>> Waiting.....";
}
public LevCheckbox(CheckBox chk, string url, string fileName, string command, string remark = null)
{
this.checkBox = chk;
this.command = command;
this.softwareURL = url;
this.setupFileName = fileName;
this.status = checkBox.Text + " >>> Waiting.....";
this.remark = remark;
}
public void updateResultStatus(int exitCode)
{
if (exitCode == 0)
{
this.status = checkBox.Text + " >>> Success!";
}
else
{
this.status = checkBox.Text + " >>> Error!";
}
if (remark != null)
{
this.status += this.remark;
}
}
public void updateInstallingStatus()
{
this.status = checkBox.Text + " >>> Installing...";
}
public void updateDownloadingStatus()
{
this.status = checkBox.Text + " >>> Downloading...";
}
}
}