forked from EFLFE/PingoMeter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (27 loc) · 833 Bytes
/
Copy pathProgram.cs
File metadata and controls
31 lines (27 loc) · 833 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
29
30
31
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
namespace PingoMeter;
internal static class Program
{
/// <summary> x.x.x program version string. </summary>
public const string VERSION = "0.9.9";
[STAThread]
public static void Main()
{
try
{
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
using var notificationIcon = new NotificationIcon();
notificationIcon.Run();
}
catch (Exception ex)
{
File.WriteAllText("error.txt", $"[PingoMeter crash log]\n\n{ex}");
Process.Start(new ProcessStartInfo("error.txt") { UseShellExecute = true });
}
}
}