File tree 4 files changed +13
-18
lines changed
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 ;
2
3
using ElectronNET . API . Entities ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
@@ -21,7 +22,7 @@ public IActionResult Index()
21
22
await Electron . Dialog . ShowMessageBoxAsync ( options ) ;
22
23
} ) ;
23
24
24
- Electron . App . WillQuit += ( ) => Electron . GlobalShortcut . UnregisterAll ( ) ;
25
+ Electron . App . WillQuit += arg => Task . Run ( ( ) => Electron . GlobalShortcut . UnregisterAll ( ) ) ;
25
26
}
26
27
27
28
return View ( ) ;
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<Project Sdk =" Microsoft.NET.Sdk.Web" >
3
3
<PropertyGroup >
4
- <TargetFramework >netcoreapp2.0 </TargetFramework >
4
+ <TargetFramework >netcoreapp2.2 </TargetFramework >
5
5
</PropertyGroup >
6
6
<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" />
16
11
</ItemGroup >
17
12
<ItemGroup >
18
13
<None Update =" Assets\electron.ico" >
Original file line number Diff line number Diff line change @@ -8,13 +8,12 @@ public class Program
8
8
{
9
9
public static void Main ( string [ ] args )
10
10
{
11
- BuildWebHost ( args ) . Run ( ) ;
11
+ CreateWebHostBuilder ( args ) . Build ( ) . Run ( ) ;
12
12
}
13
13
14
- public static IWebHost BuildWebHost ( string [ ] args ) =>
14
+ public static IWebHostBuilder CreateWebHostBuilder ( string [ ] args ) =>
15
15
WebHost . CreateDefaultBuilder ( args )
16
16
. UseStartup < Startup > ( )
17
- . UseElectron ( args )
18
- . Build ( ) ;
17
+ . UseElectron ( args ) ;
19
18
}
20
19
}
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
14
14
You'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.
15
15
16
16
``` bash
17
+ $ dotnet tool install --global ElectronNET.CLI
17
18
$ git clone https://github.com/ElectronNET/electron.net-api-demos.git
18
19
$ cd electron.net-api-demos
19
20
$ cd ElectronNET-API-Demos
20
- $ dotnet restore
21
- $ dotnet electronize start
21
+ $ electronize start
22
22
```
23
23
24
24
** Enjoy!**
You can’t perform that action at this time.
0 commit comments