enhanced demo for

https://github.com/ElectronNET/Electron.NET/issues/42
This commit is contained in:
Robert Muehsig
2017-11-07 22:21:52 +01:00
parent 6fc79c1b50
commit 24ef987471
2 changed files with 12 additions and 2 deletions

View File

@@ -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"] );
}
}
}

View File

@@ -4,5 +4,6 @@
"LogLevel": {
"Default": "Warning"
}
}
},
"DemoTitleInSettings": "Electron.NET API Demos"
}