mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-09 02:07:47 +00:00
enhanced demo for
https://github.com/ElectronNET/Electron.NET/issues/42
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using ElectronNET.API.Entities;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
@@ -9,6 +10,13 @@ namespace ElectronNET.WebApp
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
@@ -36,6 +44,7 @@ namespace ElectronNET.WebApp
|
||||
});
|
||||
|
||||
|
||||
|
||||
if(HybridSupport.IsElectronActive)
|
||||
{
|
||||
ElectronBootstrap();
|
||||
@@ -52,7 +61,7 @@ namespace ElectronNET.WebApp
|
||||
});
|
||||
|
||||
browserWindow.OnReadyToShow += () => browserWindow.Show();
|
||||
browserWindow.SetTitle("Electron.NET API Demos");
|
||||
browserWindow.SetTitle(Configuration["DemoTitleInSettings"] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DemoTitleInSettings": "Electron.NET API Demos"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user