From b35804310a123f46b1da74a1aa3f511cde85cfec Mon Sep 17 00:00:00 2001 From: Andrew Miller Date: Thu, 16 Apr 2020 15:06:35 -0500 Subject: [PATCH] Download/Launch refactoring part 1 --- ZenovaLauncher/Pages/PlayPage.xaml | 18 ++-- ZenovaLauncher/Pages/ProfilesPage.xaml | 16 ++-- ZenovaLauncher/Profiles/ProfileLauncher.cs | 95 +++++++++++++++---- .../Profiles/VersionDownloadInfo.cs | 56 ----------- ZenovaLauncher/ZenovaLauncher.csproj | 1 - 5 files changed, 91 insertions(+), 95 deletions(-) delete mode 100644 ZenovaLauncher/Profiles/VersionDownloadInfo.cs diff --git a/ZenovaLauncher/Pages/PlayPage.xaml b/ZenovaLauncher/Pages/PlayPage.xaml index 4ea1e8e..5ce58cc 100644 --- a/ZenovaLauncher/Pages/PlayPage.xaml +++ b/ZenovaLauncher/Pages/PlayPage.xaml @@ -85,8 +85,8 @@ FontSize="14" Style="{DynamicResource LauncherAccentButtonStyle}" Click="PlayButtonClick" - Content="{Binding Path=IsNotDownloading, Converter={StaticResource PlayButtonContent}}" - IsEnabled="{Binding Path=IsNotDownloading}"> + Content="{Binding Path=IsNotLaunching, Converter={StaticResource PlayButtonContent}}" + IsEnabled="{Binding Path=IsNotLaunching}"> + Visibility="{Binding Path=IsLaunching, Converter={StaticResource BooleanToVisibilityConverter}}"> @@ -103,7 +103,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -134,13 +134,13 @@ ui:ControlHelper.CornerRadius="0" Background="{DynamicResource LauncherControlTransientLowBackgroundBrush}" Minimum="0" - Maximum="{Binding DownloadInfo.TotalSize}" - Value="{Binding DownloadInfo.DownloadedBytes}" - IsIndeterminate="{Binding DownloadInfo.IsProgressIndeterminate}" /> + Maximum="{Binding LaunchInfo.TotalSize}" + Value="{Binding LaunchInfo.DownloadedBytes}" + IsIndeterminate="{Binding LaunchInfo.IsProgressIndeterminate}" /> diff --git a/ZenovaLauncher/Pages/ProfilesPage.xaml b/ZenovaLauncher/Pages/ProfilesPage.xaml index cdbc046..a44cdde 100644 --- a/ZenovaLauncher/Pages/ProfilesPage.xaml +++ b/ZenovaLauncher/Pages/ProfilesPage.xaml @@ -132,7 +132,7 @@ Click="PlayButtonClick" Width="66" Content="{Binding Path=Launching, Converter={StaticResource PlayButtonContent}}" - IsEnabled="{Binding Path=DataContext.IsNotDownloading, RelativeSource={RelativeSource AncestorType={x:Type Page}}}"/> + IsEnabled="{Binding Path=DataContext.IsNotLaunching, RelativeSource={RelativeSource AncestorType={x:Type Page}}}"/>