Exemple #1
0
    static void Main(string[] args)
    {
        var appBuilder = PhotinoBlazorAppBuilder.CreateDefault(args);

        appBuilder.Services.AddLogging();
        DataServiceModule.Setup(appBuilder.Services);
        appBuilder.RootComponents.Add <App>("app");

        var app = appBuilder.Build();

        AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
        { app.MainWindow.OpenAlertWindow("Fatal exception", error.ExceptionObject.ToString()); };

        app.MainWindow
        .SetTitle("OpenRpg - Data Editor")
        .SetSize(1920, 1080)
        .SetUseOsDefaultSize(false)
        .Load("./wwwroot/index.html");

        app.Run();
    }
Exemple #2
0
        static void Main(string[] args)
        {
            var appBuilder = PhotinoBlazorAppBuilder.CreateDefault(args);

            appBuilder.Services
            .AddLogging();

            // register root component
            appBuilder.RootComponents.Add <App>("app");

            var app = appBuilder.Build();

            // customize window
            app.MainWindow
            .SetIconFile("favicon.ico")
            .SetTitle("Photino Hello World");

            AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
            {
                app.MainWindow.OpenAlertWindow("Fatal exception", error.ExceptionObject.ToString());
            };

            app.Run();
        }