26 lines
798 B
C#
26 lines
798 B
C#
using System.Runtime.InteropServices;
|
|
using Avalonia;
|
|
using Poe2Trade.Core;
|
|
|
|
namespace Poe2Trade.Ui;
|
|
|
|
class Program
|
|
{
|
|
[DllImport("kernel32.dll")]
|
|
private static extern bool AttachConsole(int dwProcessId);
|
|
|
|
[STAThread]
|
|
public static void Main(string[] args)
|
|
{
|
|
AttachConsole(-1); // ATTACH_PARENT_PROCESS — reuse the launching terminal
|
|
Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = true });
|
|
Console.SetError(new StreamWriter(Console.OpenStandardError()) { AutoFlush = true });
|
|
Logging.Setup();
|
|
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
|
}
|
|
|
|
public static AppBuilder BuildAvaloniaApp()
|
|
=> AppBuilder.Configure<App>()
|
|
.UsePlatformDetect()
|
|
.LogToTrace();
|
|
}
|