-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
34 lines (30 loc) · 1.19 KB
/
Program.cs
File metadata and controls
34 lines (30 loc) · 1.19 KB
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
// Alias the form type so it doesn't conflict with Program.Main()
using System.Globalization;
using MainForm = Tool_Hazard.Main;
namespace Tool_Hazard
{
/// <summary>The main entry point for the application.</summary>
internal static class Program
{
[STAThread]
static void Main()
{
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
// Initialize the application configuration (e.g. play startup sound if enabled)
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
var main = new MainForm();
main.Shown += (_, __) =>
{
if (Properties.Settings.Default.PlayStartupSound)
{
// This calls the *form type* method (static), not Program.Main()
MainForm.PlayEmbeddedWav("Tool_Hazard.Resources.POWER-ON.WAV");
}
};
Application.Run(main);
}
}
}