Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.AspNetCore.Builder;
- using Microsoft.AspNetCore.Hosting;
- using Microsoft.Extensions.DependencyInjection;
- using ElectronNET.API;
- using ElectronNET.API.Entities;
- using Microsoft.Extensions.Hosting;
- namespace TestApp
- {
- public class Startup
- {
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddMvc();
- }
- public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
- {
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- }
- app.UseRouting();
- app.UseStaticFiles();
- app.UseEndpoints(endpoints =>
- {
- endpoints.MapDefaultControllerRoute();
- });
- Bootstrap();
- }
- public async void Bootstrap()
- {
- var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions
- {
- Height = 490,
- Width = 670,
- Center = true,
- UseContentSize = true,
- Show = true,
- Transparent = false,
- Frame = true,
- Resizable = false
- });
- browserWindow.OnReadyToShow += () => browserWindow.Show();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment