-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml.cs
More file actions
28 lines (24 loc) · 837 Bytes
/
App.xaml.cs
File metadata and controls
28 lines (24 loc) · 837 Bytes
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
using System.Windows;
using System.Security.Principal;
using System.Reflection;
namespace TalkGuard;
public partial class App : Application
{
// Credits - Do not remove
public const string AppName = "ShieldX";
public const string AppVersion = "1.0.0";
public const string Credits = "Made by talkdedsec & threatvec";
public const string Author1 = "talkdedsec";
public const string Author2 = "threatvec";
public const string GitHubUrl = "https://github.com/threatvec/ShieldX";
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
}
public static bool IsAdministrator()
{
var identity = WindowsIdentity.GetCurrent();
var principal = new WindowsPrincipal(identity);
return principal.IsInRole(WindowsBuiltInRole.Administrator);
}
}