diff --git a/ElectronNET.WebApp/Startup.cs b/ElectronNET.WebApp/Startup.cs index ad9a68c..83b01d2 100644 --- a/ElectronNET.WebApp/Startup.cs +++ b/ElectronNET.WebApp/Startup.cs @@ -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"] ); } } } diff --git a/ElectronNET.WebApp/appsettings.json b/ElectronNET.WebApp/appsettings.json index 5fff67b..f94192b 100644 --- a/ElectronNET.WebApp/appsettings.json +++ b/ElectronNET.WebApp/appsettings.json @@ -4,5 +4,6 @@ "LogLevel": { "Default": "Warning" } - } + }, + "DemoTitleInSettings": "Electron.NET API Demos" }