-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
30 lines (25 loc) · 963 Bytes
/
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
namespace HLWebScraper.Net;
internal class Program
{
private static void Main(string[] args)
{
// Check if the operating system is supported
if (!IsSupportedOS())
{
MessageBox.Show(text: "This application is not compatible with Windows 7 or Windows 8." +
"\nPlease run this application on Windows 10 or later.",
caption: "Unsupported Operating System", buttons: MessageBoxButtons.OK, icon: MessageBoxIcon.Error);
return;
}
// Start the WinForms application
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(defaultValue: false);
Application.Run(mainForm: new FrmMainApp());
}
private static bool IsSupportedOS()
{
// Get the current operating system version
Version osVersion = Environment.OSVersion.Version;
return osVersion.Major >= 10;
}
}