From f64d41b06aa69fa7b2d025e0bf60610dab336693 Mon Sep 17 00:00:00 2001 From: SmokeyStack Date: Wed, 11 Sep 2024 16:06:05 -0400 Subject: [PATCH] Updated UI --- SmokeyVersionSwitcher/Downloader.cs | 8 +- SmokeyVersionSwitcher/MainWindow.xaml | 22 +- SmokeyVersionSwitcher/MainWindow.xaml.cs | 644 ++++++++++-------- .../MinecraftPackageFamilies.cs | 8 + SmokeyVersionSwitcher/Preferences.cs | 7 + .../SampleData/SampleClasses.cs | 18 + .../SampleData/Versions.xaml | 4 + .../SmokeyVersionSwitcher.csproj | 8 +- SmokeyVersionSwitcher/VersionList.cs | 51 +- 9 files changed, 443 insertions(+), 327 deletions(-) create mode 100644 SmokeyVersionSwitcher/MinecraftPackageFamilies.cs create mode 100644 SmokeyVersionSwitcher/Preferences.cs create mode 100644 SmokeyVersionSwitcher/SampleData/SampleClasses.cs create mode 100644 SmokeyVersionSwitcher/SampleData/Versions.xaml diff --git a/SmokeyVersionSwitcher/Downloader.cs b/SmokeyVersionSwitcher/Downloader.cs index f079a88..c39b932 100644 --- a/SmokeyVersionSwitcher/Downloader.cs +++ b/SmokeyVersionSwitcher/Downloader.cs @@ -93,13 +93,7 @@ public void EnableUserAuthorization() public async Task Download(string updateIdentity, string revisionNumber, string destination, DownloadProgress progress, CancellationToken cancellationToken) { - string link = await GetDownloadUrl(updateIdentity, revisionNumber); - - if (link == null) - { - throw new BadUpdateIdentityException(); - } - + string link = await GetDownloadUrl(updateIdentity, revisionNumber) ?? throw new BadUpdateIdentityException(); Debug.WriteLine("Resolved download link: " + link); await DownloadFile(link, destination, progress, cancellationToken); } diff --git a/SmokeyVersionSwitcher/MainWindow.xaml b/SmokeyVersionSwitcher/MainWindow.xaml index 5cf8ba7..16ec29f 100644 --- a/SmokeyVersionSwitcher/MainWindow.xaml +++ b/SmokeyVersionSwitcher/MainWindow.xaml @@ -7,6 +7,10 @@ mc:Ignorable="d" Title="SmokeyStack's Version Switcher" Height="800" Width="800"> + + + + @@ -102,7 +106,7 @@ - + @@ -111,7 +115,7 @@ - + @@ -125,12 +129,18 @@ -