WingCalculator/Program.cs
/// <summary>
///  The main entry point for the application.
/// </summary>
The main entry point for the application.
The main entry point for the application .
[STAThread]
	private static void Main()
	{
		ApplicationConfiguration.Initialize();
		try
		{
			if (File.Exists(ConfigPath))
			{
				Config = JsonSerializer.Deserialize<Config>(File.ReadAllText(ConfigPath));
			}
			else
			{
				Config = new();
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message, "Error Loading Config", MessageBoxButtons.OK, MessageBoxIcon.Error);
		}
		KeyboardShortcutHandler = Config.ShortcutHandler;
		Application.ApplicationExit += OnExit;
		_mainForm = new MainForm(Config);
		Application.Run(_mainForm);
	}
[ STAThread ] private static void Main ( ) { ApplicationConfiguration . Initialize ( ) ; try { if ( File . Exists ( ConfigPath ) ) { Config = JsonSerializer . Deserialize < Config > ( File . ReadAllText ( ConfigPath ) ) ; } else { Config = new ( ) ; } } catch ( Exception ex ) { MessageBox . Show ( ex . Message , " " , MessageBoxButtons . OK , MessageBoxIcon . Error ) ; } KeyboardShortcutHandler = Config . ShortcutHandler ; Application . ApplicationExit += OnExit ; _mainForm = new MainForm ( Config ) ; Application . Run ( _mainForm ) ; }
The main entry point for the application.
The main entry point for the application .
// To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration.