mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
f69a0f1175
* **(Improvement) Calibration - Elephant Foot:** (#145) * Remove text from bottom layers to prevent islands from not adhering to plate * Add a option to extrude text up to a height * **(Improvement) Calibration - Exposure time finder:** (#144) * Increase the left and right margin to 10mm * Allow to iterate over pixel brightness and generate dimmed objects to test multiple times at once * **(Fix) File format PWS:** * Some files would produce black layers if pixels are not full whites, Antialiasing level was not inherit from source * Antialiasing level was forced 1 and not read the value from file properties * Antialiasing threshold pixel math was producing the wrong pixel value * **(Fix) Raw images (jpg, png, etc):** (#146) * Set layer height to be 0.01mm by default to allow the use of some tools * When add layers by clone or other tool it don't update layers height, positions, indexes, leading to crashes * **(Fix) Actions - Import Layers:** (#146, #147) * ROI calculation error leading to not process images that can potential fit inside the volumes * Out-of-bounds calculation for Stack type * Replace type was calculating out-of-bounds calculation like Stack type when is not required to and can lead to skip images * Better image ROI colection for Insert and Replace types instead of capture the center most * (Fix) Settings window: Force a redraw on open to fix auto sizes
55 lines
2.0 KiB
C#
55 lines
2.0 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using Avalonia;
|
|
using UVtools.WPF.Extensions;
|
|
|
|
namespace UVtools.WPF
|
|
{
|
|
public static class Program
|
|
{
|
|
public static string[] Args;
|
|
|
|
public static Stopwatch ProgramStartupTime;
|
|
// 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]
|
|
public static void Main(string[] args)
|
|
{
|
|
ProgramStartupTime = Stopwatch.StartNew();
|
|
Args = args;
|
|
|
|
// Add the event handler for handling non-UI thread exceptions to the event.
|
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
|
|
|
|
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
|
}
|
|
|
|
private static async void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
Exception ex = (Exception)e.ExceptionObject;
|
|
string errorMsg = "An application error occurred. Please contact the administrator with the following information:\n\n" +
|
|
$"{ex}";
|
|
|
|
await App.MainWindow.MessageBoxError(errorMsg, "Fatal Non-UI Error");
|
|
}
|
|
catch (Exception)
|
|
{
|
|
}
|
|
}
|
|
|
|
// Avalonia configuration, don't remove; also used by visual designer.
|
|
public static AppBuilder BuildAvaloniaApp()
|
|
=> AppBuilder.Configure<App>()
|
|
.UsePlatformDetect()
|
|
.With(new Win32PlatformOptions { AllowEglInitialization = true/*, UseWgl = true*/})
|
|
.With(new X11PlatformOptions { UseGpu = true/*, UseEGL = true*/ })
|
|
.With(new MacOSPlatformOptions { ShowInDock = true })
|
|
.With(new AvaloniaNativePlatformOptions { UseGpu = true })
|
|
.UseSkia()
|
|
.LogToTrace();
|
|
}
|
|
}
|