forked from Necrobot-Private/NecroBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml.cs
45 lines (39 loc) · 1.13 KB
/
App.xaml.cs
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
#region using directives
using System;
using System.Reflection;
using System.Windows;
using Awesomium.Core;
#endregion
namespace PoGo.NecroBot.GUI
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App
{
protected override void OnStartup(StartupEventArgs e)
{
// Initialization must be performed here,
// before creating a WebControl.
if (!WebCore.IsInitialized)
{
var baseUri = new Uri(Assembly.GetEntryAssembly().Location);
WebCore.Initialize(new WebConfig
{
HomeURL = new Uri(baseUri, "WebUi/"),
LogPath = @".\starter.log",
LogLevel = LogLevel.Verbose,
RemoteDebuggingPort = 9033
});
}
base.OnStartup(e);
}
protected override void OnExit(ExitEventArgs e)
{
// Make sure we shutdown the core last.
if (WebCore.IsInitialized)
WebCore.Shutdown();
base.OnExit(e);
}
}
}