-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
57 lines (53 loc) · 1.91 KB
/
Program.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
using PastebinAPI;
using System.Net;
namespace activator
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
string needUpdate = new WebClient().DownloadString("https://pastebin.com/raw/4syXnW8w");
if (needUpdate == null | needUpdate == "")
{
MessageBox.Show(
"MSActivate could not check for security updates online.",
"Security Updates Paused",
MessageBoxButtons.OK,
MessageBoxIcon.Asterisk
);
ApplicationConfiguration.Initialize();
Application.Run(new MainWindow());
} else if (needUpdate == "no")
{
ApplicationConfiguration.Initialize();
Application.Run(new MainWindow());
} else
{
DialogResult upgradeMsg = MessageBox.Show(
"MSActivate has a security update avaliable for your version. If you are running that version, you can skip." +
"If not, please download it from MSActivate's GitHub page.",
"Security Update Avaliable",
MessageBoxButtons.CancelTryContinue,
MessageBoxIcon.Exclamation
);
if (upgradeMsg == DialogResult.Cancel)
{
Application.Exit();
}
else if (upgradeMsg == DialogResult.TryAgain)
{
Application.Exit();
}
else if (upgradeMsg == DialogResult.Continue)
{
ApplicationConfiguration.Initialize();
Application.Run(new MainWindow());
}
}
}
}
}