Skip to content

Commit 61dac7a

Browse files
committed
A Major overhaul
With the upgrade to net9 the syncfusion license I had been using would no longer work and I could not agree to their new terms. This required a rewrite of the comboBox control to be fully independent and impacted a lot of pages. I also wrote a property grid control that uses reflections to allow for editing of properties of an object. This will be applied to more of the app soon. This also brings the completed Misc save editor for gen3 Sapphire and Ruby. A few more tabs are needed for the other gen 3 games. This also includes misc. fixes and upgrades for net9 as well as dependency updates.
1 parent 189bba1 commit 61dac7a

File tree

79 files changed

+726
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+726
-73
lines changed

App.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using PKHeX.Core;
1+
#nullable disable
2+
3+
using PKHeX.Core;
24
using static PKHeXMAUI.MainPage;
35
namespace PKHeXMAUI;
46

AppShell.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
#nullable disable
3+
24
using PKHeX.Core;
35
using PKHeX.Core.AutoMod;
46
using System.Windows.Input;

EncounterDB/EncounterDB.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
#nullable disable
3+
24
using PKHeX.Core;
35
using System.Runtime.CompilerServices;
46
using static PKHeXMAUI.MainPage;

EncounterDB/SearchSettings.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#nullable disable
2+
13
using static PKHeXMAUI.MainPage;
24
using static PKHeXMAUI.EncounterDB;
35
using PKHeX.Core;

LiveHex/LiveHex.xaml.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ private async void botbaseconnect(object sender, EventArgs e)
8585
}
8686
}
8787
catch(Exception) { }
88-
89-
9088
}
9189
if (!valid)
9290
{
@@ -200,7 +198,7 @@ private async void B_ReadFromOff_Click(object sender, EventArgs e)
200198
}
201199
catch (Exception ex)
202200
{
203-
await DisplayAlert("Error", $"Unable to load data from the specified offset. {ex.Message}", "cancel");
201+
await DisplayAlert("Error", $"Unable to load data from the specified offset. {ex.Message}", "cancel");
204202
}
205203
}
206204
}
@@ -274,7 +272,6 @@ private void SetTrainerData(SaveFile sav)
274272
{
275273
// Check and set trainerdata based on ISaveBlock interfaces
276274
Span<byte> dest;
277-
278275
Func<PokeSysBotMini, byte[]?> tdata;
279276
switch (sav)
280277
{

MauiProgram.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
#nullable disable
3+
24
using Microsoft.Extensions.Logging;
35
using Microsoft.Maui.LifecycleEvents;
46
using CommunityToolkit.Maui;

PKHeX.MAUI.csproj

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net9.0-maccatalyst;net9.0-android35.0</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
65
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
76
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
87
<OutputType>Exe</OutputType>
98
<RootNamespace>PKHeXMAUI</RootNamespace>
109
<UseMaui>true</UseMaui>
11-
10+
<LangVersion>preview</LangVersion>
1211
<SingleProject>true</SingleProject>
1312
<ImplicitUsings>enable</ImplicitUsings>
1413

@@ -20,10 +19,11 @@
2019

2120
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
2221
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
23-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
22+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">30.0</SupportedOSPlatformVersion>
2423
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
2524
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
2625
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
26+
<Nullable>enable</Nullable>
2727
</PropertyGroup>
2828

2929
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-android|AnyCPU'">
@@ -208,6 +208,9 @@
208208
<Compile Update="pktabs\StatsTab.xaml.cs">
209209
<DependentUpon>StatsTab.xaml</DependentUpon>
210210
</Compile>
211+
<Compile Update="SaveEditors\Gen3\Misc\MiscMain.xaml.cs">
212+
<DependentUpon>MiscMain.xaml</DependentUpon>
213+
</Compile>
211214
<Compile Update="SaveEditors\SaveAccessors\gen8+\BlockEditor8.xaml.cs">
212215
<DependentUpon>BlockEditor8.xaml</DependentUpon>
213216
</Compile>
@@ -292,6 +295,18 @@
292295
<MauiXaml Update="SaveEditors\Gen2\MailBox.xaml">
293296
<Generator>MSBuild:Compile</Generator>
294297
</MauiXaml>
298+
<MauiXaml Update="SaveEditors\Gen3\Misc\MiscDecorations.xaml">
299+
<Generator>MSBuild:Compile</Generator>
300+
</MauiXaml>
301+
<MauiXaml Update="SaveEditors\Gen3\Misc\MiscPaintings.xaml">
302+
<Generator>MSBuild:Compile</Generator>
303+
</MauiXaml>
304+
<MauiXaml Update="SaveEditors\Gen3\Misc\MiscPokeblock.xaml">
305+
<Generator>MSBuild:Compile</Generator>
306+
</MauiXaml>
307+
<MauiXaml Update="SaveEditors\Gen3\Misc\MiscRecords.xaml">
308+
<Generator>MSBuild:Compile</Generator>
309+
</MauiXaml>
295310
<MauiXaml Update="SaveEditors\Gen3\RTC3Editor.xaml">
296311
<Generator>MSBuild:Compile</Generator>
297312
</MauiXaml>
@@ -373,6 +388,9 @@
373388
<MauiXaml Update="Settings\LegalitySettings.xaml">
374389
<Generator>MSBuild:Compile</Generator>
375390
</MauiXaml>
391+
<MauiXaml Update="Util\propertyGrid.xaml">
392+
<Generator>MSBuild:Compile</Generator>
393+
</MauiXaml>
376394
</ItemGroup>
377395

378396
<ItemGroup>

Platforms/Android/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
<uses-permission android:name="android.permission.INTERNET" />
66
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
77
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
8-
<uses-sdk android:minSdkVersion="21" />
98
</manifest>

Platforms/Android/MainActivity.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using Android.App;
1+
#nullable disable
2+
3+
using Android.App;
24
using Android.Content.PM;
35
using Android.OS;
46
using Android.Content;
@@ -13,14 +15,14 @@ protected override void OnCreate(Bundle savedInstanceState)
1315
{
1416
if (!Android.OS.Environment.IsExternalStorageManager)
1517
{
16-
Intent intent = new Intent();
18+
Intent intent = new();
1719
intent.SetAction(Android.Provider.Settings.ActionManageAppAllFilesAccessPermission);
1820
Android.Net.Uri uri = Android.Net.Uri.FromParts("package", this.PackageName, null);
1921
intent.SetData(uri);
2022
StartActivity(intent);
2123
}
2224
}
23-
catch (Exception e) { };
25+
catch (Exception) { }
2426
base.OnCreate(savedInstanceState);
2527
}
2628
}

Platforms/Android/MainApplication.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using Android.App;
1+
#nullable disable
2+
3+
using Android.App;
24
using Android.Runtime;
35

46
namespace PKHeXMAUI;

0 commit comments

Comments
 (0)