Files
MercuryConverter/Program.cs
T

38 lines
1.1 KiB
C#
Raw Normal View History

2025-08-11 23:02:15 -07:00
namespace MercuryConverter;
using Avalonia;
2025-08-06 17:03:37 -07:00
using System;
2025-08-11 23:02:15 -07:00
using MercuryConverter.UI;
using Avalonia.Logging;
2025-08-06 17:03:37 -07:00
class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
2025-08-13 20:13:40 -07:00
public static void Main(string[] args)
{
// BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
try
{
// prepare and run your App here
BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
}
catch (Exception e)
{
// here we can work with the exception, for example add it to our log file
Console.WriteLine($"App exception!!\b{e}");
}
2025-08-13 20:13:40 -07:00
}
2025-08-06 17:03:37 -07:00
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace(LogEventLevel.Debug);
2025-08-06 17:03:37 -07:00
}