File tree Expand file tree Collapse file tree 4 files changed +13
-18
lines changed Expand file tree Collapse file tree 4 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 1- using ElectronNET . API ;
1+ using System . Threading . Tasks ;
2+ using ElectronNET . API ;
23using ElectronNET . API . Entities ;
34using Microsoft . AspNetCore . Mvc ;
45
@@ -21,7 +22,7 @@ public IActionResult Index()
2122 await Electron . Dialog . ShowMessageBoxAsync ( options ) ;
2223 } ) ;
2324
24- Electron . App . WillQuit += ( ) => Electron . GlobalShortcut . UnregisterAll ( ) ;
25+ Electron . App . WillQuit += arg => Task . Run ( ( ) => Electron . GlobalShortcut . UnregisterAll ( ) ) ;
2526 }
2627
2728 return View ( ) ;
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<Project Sdk =" Microsoft.NET.Sdk.Web" >
33 <PropertyGroup >
4- <TargetFramework >netcoreapp2.0 </TargetFramework >
4+ <TargetFramework >netcoreapp2.2 </TargetFramework >
55 </PropertyGroup >
66 <ItemGroup >
7- <PackageReference Include =" ElectronNET.API" Version =" 0.0.6" />
8- <PackageReference Include =" Microsoft.AspNetCore.All" Version =" 2.0.0" />
9- <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" Version =" 2.0.0" />
10- </ItemGroup >
11- <ItemGroup >
12- <DotNetCliToolReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version =" 2.0.0" />
13- </ItemGroup >
14- <ItemGroup >
15- <DotNetCliToolReference Include =" ElectronNET.CLI" Version =" *" />
7+ <PackageReference Include =" ElectronNET.API" Version =" 0.0.11" />
8+ <PackageReference Include =" Microsoft.AspNetCore.App" />
9+ <PackageReference Include =" Microsoft.VisualStudio.Web.BrowserLink" Version =" 2.2.0" />
10+ <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" Version =" 2.2.1" />
1611 </ItemGroup >
1712 <ItemGroup >
1813 <None Update =" Assets\electron.ico" >
Original file line number Diff line number Diff line change @@ -8,13 +8,12 @@ public class Program
88 {
99 public static void Main ( string [ ] args )
1010 {
11- BuildWebHost ( args ) . Run ( ) ;
11+ CreateWebHostBuilder ( args ) . Build ( ) . Run ( ) ;
1212 }
1313
14- public static IWebHost BuildWebHost ( string [ ] args ) =>
14+ public static IWebHostBuilder CreateWebHostBuilder ( string [ ] args ) =>
1515 WebHost . CreateDefaultBuilder ( args )
1616 . UseStartup < Startup > ( )
17- . UseElectron ( args )
18- . Build ( ) ;
17+ . UseElectron ( args ) ;
1918 }
2019}
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ This Demo-App based on the [Electron API Demos](https://github.com/electron/elec
1414You'll need [ Node.js (v.8.x)] ( https://nodejs.org ) and [ .NET Core SDK] ( https://www.microsoft.com/net/download/core ) installed on your computer in order to start or build this app.
1515
1616``` bash
17+ $ dotnet tool install --global ElectronNET.CLI
1718$ git clone https://github.com/ElectronNET/electron.net-api-demos.git
1819$ cd electron.net-api-demos
1920$ cd ElectronNET-API-Demos
20- $ dotnet restore
21- $ dotnet electronize start
21+ $ electronize start
2222```
2323
2424** Enjoy!**
You can’t perform that action at this time.
0 commit comments