-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathApp.xaml.cs
More file actions
35 lines (34 loc) · 1.08 KB
/
App.xaml.cs
File metadata and controls
35 lines (34 loc) · 1.08 KB
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
using PKHeX.Core;
using static PKHeXMAUI.MainPage;
namespace PKHeXMAUI;
public partial class App : Application
{
public App()
{
//Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("Ngo9BigBOggjHTQxAR8/V1NGaF1cXGFCf1FpRmJGdld5fUVHYVZUTXxaS00DNHVRdkdgWXZedXVTRmFfWEZxXkE=");
InitializeComponent();
}
protected override Window CreateWindow(IActivationState? activationState)
{
var Version = Preferences.Default.Get("SaveFile", 50);
Window window = new(PSettings.RememberLastSave
? new AppShell(BlankSaveFile.Get((GameVersion)Version, "PKHeX"))
: (Page)new AppShell(BlankSaveFile.Get(GameVersion.SL, "PKHeX")));
window.Resumed += (s, e) =>
{
if (LiveHex.Reconnect)
{
if (!Remote.Connected)
{
Remote.com.Connect();
}
else
{
Remote.com.Disconnect();
Remote.com.Connect();
}
}
};
return window;
}
}