FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Electron.NET/src/ElectronNET.ConsoleApp/Program.cs at develop · ElectronNET/Electron.NET · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
ElectronNET
/
Electron.NET
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
743
Star
7.6k
Code
Issues
21
Pull requests
1
Discussions
Actions
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Electron.NET
/
src
/
ElectronNET.ConsoleApp
/
Program.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (39 loc) · 1.36 KB
Breadcrumbs
Electron.NET
/
src
/
ElectronNET.ConsoleApp
/
Program.cs
Copy path
File metadata and controls
50 lines (39 loc) · 1.36 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using
ElectronNET
.
API
;
namespace
ElectronNET
.
WebApp
{
using
System
;
using
System
.
Threading
.
Tasks
;
using
ElectronNET
.
API
.
Entities
;
public
class
Program
{
public
static
async
Task
Main
(
string
[
]
args
)
{
var
runtimeController
=
ElectronNetRuntime
.
RuntimeController
;
try
{
await
runtimeController
.
Start
(
)
;
await
runtimeController
.
WaitReadyTask
;
await
ElectronBootstrap
(
)
;
await
runtimeController
.
WaitStoppedTask
;
}
catch
(
Exception
ex
)
{
Console
.
WriteLine
(
ex
)
;
await
runtimeController
.
Stop
(
)
.
ConfigureAwait
(
false
)
;
await
runtimeController
.
WaitStoppedTask
.
WaitAsync
(
TimeSpan
.
FromSeconds
(
2
)
)
.
ConfigureAwait
(
false
)
;
}
}
public
static
async
Task
ElectronBootstrap
(
)
{
//AddDevelopmentTests();
var
browserWindow
=
await
Electron
.
WindowManager
.
CreateWindowAsync
(
new
BrowserWindowOptions
{
Width
=
1152
,
Height
=
940
,
Show
=
false
,
}
,
"https://github.com/ElectronNET/Electron.NET"
)
;
await
browserWindow
.
WebContents
.
Session
.
ClearCacheAsync
(
)
;
browserWindow
.
OnReadyToShow
+=
(
)
=>
browserWindow
.
Show
(
)
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL