lokinet/ui-win32/Program.cs
Rick V 67de4e1125
new loki AboutBox logo
kill any lingering lokinet process at startup
add option to disable autoscroll (broken)
2019-04-06 23:04:04 -05:00

39 lines
1.1 KiB
C#

using System;
using System.Diagnostics;
using System.Windows.Forms;
namespace network.loki.lokinet.win32.ui
{
static class Program
{
public static OperatingSystem os_id = Environment.OSVersion;
public static PlatformID platform = os_id.Platform;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// Scrub any old lokinet process left behind
Process[] old_pids = Process.GetProcessesByName("lokinet");
foreach (Process pid in old_pids)
{
try
{
pid.Kill();
}
catch { } // don't yell
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new main_frame());
try
{
main_frame.lokiNetDaemon.Kill();
}
catch
{ }
}
}
}