-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathProgram.cs
45 lines (40 loc) · 1.38 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
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace SecureDesktop_GUI
{
static class Program
{
public static string location = "";
[STAThread]
static void Main()
{
location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
if (!CheckValidity()) return;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Main());
}
public static bool CheckValidity()
{
if (!File.Exists(location + "\\Cleanup.exe"))
{
MessageBox.Show("Missing cleanup executable", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!File.Exists(location + "\\SecureDesktop.exe"))
{
MessageBox.Show("Missing Secure Desktop executable", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!File.Exists(location + "\\Gma.UserActivityMonitor.dll"))
{
MessageBox.Show("Missing Gma.UserActivityMonitor.dll", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
return true;
}
}
}