2024-01-21 16:50:56 +03:00
|
|
|
|
using System;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2024-03-03 09:49:40 +03:00
|
|
|
|
using Photino.Blazor.CustomWindow.Extensions;
|
2024-01-21 16:50:56 +03:00
|
|
|
|
|
|
|
|
|
|
namespace Photino.Blazor.CustomWindow.Sample
|
|
|
|
|
|
{
|
2024-03-03 09:28:22 +03:00
|
|
|
|
internal class Program
|
2024-01-21 16:50:56 +03:00
|
|
|
|
{
|
|
|
|
|
|
[STAThread]
|
2024-03-03 09:28:22 +03:00
|
|
|
|
private static void Main(string[] args)
|
2024-01-21 16:50:56 +03:00
|
|
|
|
{
|
|
|
|
|
|
var appBuilder = PhotinoBlazorAppBuilder.CreateDefault(args);
|
|
|
|
|
|
|
|
|
|
|
|
appBuilder.Services
|
2024-03-03 09:49:40 +03:00
|
|
|
|
.AddCustomWindow()
|
2024-01-21 16:50:56 +03:00
|
|
|
|
.AddLogging();
|
|
|
|
|
|
|
|
|
|
|
|
// register root component and selector
|
|
|
|
|
|
appBuilder.RootComponents.Add<App>("app");
|
|
|
|
|
|
|
|
|
|
|
|
var app = appBuilder.Build();
|
|
|
|
|
|
|
|
|
|
|
|
// customize window
|
|
|
|
|
|
app.MainWindow
|
|
|
|
|
|
.SetChromeless(true) // necessarily for custom window
|
|
|
|
|
|
.SetIconFile("favicon.ico")
|
|
|
|
|
|
.SetTitle("Photino Blazor Sample");
|
|
|
|
|
|
|
|
|
|
|
|
AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
|
|
|
|
|
|
{
|
|
|
|
|
|
app.MainWindow.ShowMessage("Fatal exception", error.ExceptionObject.ToString());
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
app.Run();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|