1
0
mirror of https://github.com/mastercodeon314/KsDumper-11.git synced 2024-11-24 06:50:10 +01:00
KsDumper-11/KsDumper11/Program.cs
mastercodeon314 785233a68f v1.3 update.
Updated to KDU v1.3.4
Added new Provider Selector
Updated DarkControls
Many bug fixes
2023-10-06 18:53:56 -06:00

56 lines
1.3 KiB
C#

using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
using KsDumper11.Driver;
namespace KsDumper11
{
public class Program
{
[STAThread]
private static void Main()
{
KduSelfExtract.DisableDriverBlockList();
KduSelfExtract.Extract();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
bool driverOpen = KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper");
//Debugger.Break();
if (!driverOpen)
{
if (!File.Exists(KduSelfExtract.AssemblyDirectory + @"\\Providers.json"))
{
// Run the selector here to populate the providers and set a default provider.
Application.Run(new ProviderSelector());
Application.Run(new Dumper());
}
else
{
KduWrapper wr = new KduWrapper(KduSelfExtract.AssemblyDirectory + @"\Driver\kdu.exe");
wr.LoadProviders();
wr.Start();
if (KsDumperDriverInterface.IsDriverOpen("\\\\.\\KsDumper"))
{
Application.Run(new Dumper());
}
else
{
Environment.Exit(0);
}
}
}
else
{
Application.Run(new Dumper());
}
}
}
}