Skip to content

Commit

Permalink
Update Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Sep 14, 2023
1 parent 159b1e0 commit a359665
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/Update/Sucrose.Update/View/DarkInfoBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
</Grid.ColumnDefinitions>

<Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Image x:Name="Firework_Image" Source="pack://application:,,,/Assets/Icon/Firework.png" Visibility="Hidden" />
<Image x:Name="Confetti_Image" Source="pack://application:,,,/Assets/Icon/Confetti.png" Visibility="Hidden" />
<Image x:Name="Success_Image" Source="pack://application:,,,/Assets/Icon/Success.png" Visibility="Hidden" />
<Image x:Name="Error_Image" Source="pack://application:,,,/Assets/Icon/Error.png" Visibility="Hidden" />
<Image x:Name="Warn_Image" Source="pack://application:,,,/Assets/Icon/Warn.png" Visibility="Hidden" />
Expand Down
12 changes: 10 additions & 2 deletions src/Update/Sucrose.Update/View/DarkInfoBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal DarkInfoBox(SSDEUT Type)
Info_Image.Visibility = Visibility.Visible;
break;
case SSDEUT.Update:
Success_Image.Visibility = Visibility.Visible;
Firework_Image.Visibility = Visibility.Visible;
break;
case SSDEUT.Status:
Warn_Image.Visibility = Visibility.Visible;
Expand All @@ -32,7 +32,7 @@ internal DarkInfoBox(SSDEUT Type)
break;
case SSDEUT.Updating:
Countdown();
Success_Image.Visibility = Visibility.Visible;
Confetti_Image.Visibility = Visibility.Visible;
break;
case SSDEUT.Releases:
Warn_Image.Visibility = Visibility.Visible;
Expand All @@ -51,6 +51,14 @@ internal DarkInfoBox(SSDEUT Type)

private async void Countdown()
{
Close_Button.Content = $"{SSRER.GetValue("Update", "InfoBox", "CloseText")} 5";

await Task.Delay(1000);

Close_Button.Content = $"{SSRER.GetValue("Update", "InfoBox", "CloseText")} 4";

await Task.Delay(1000);

Close_Button.Content = $"{SSRER.GetValue("Update", "InfoBox", "CloseText")} 3";

await Task.Delay(1000);
Expand Down
2 changes: 2 additions & 0 deletions src/Update/Sucrose.Update/View/LightInfoBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
</Grid.ColumnDefinitions>

<Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Image x:Name="Firework_Image" Source="pack://application:,,,/Assets/Icon/Firework.png" Visibility="Hidden" />
<Image x:Name="Confetti_Image" Source="pack://application:,,,/Assets/Icon/Confetti.png" Visibility="Hidden" />
<Image x:Name="Success_Image" Source="pack://application:,,,/Assets/Icon/Success.png" Visibility="Hidden" />
<Image x:Name="Error_Image" Source="pack://application:,,,/Assets/Icon/Error.png" Visibility="Hidden" />
<Image x:Name="Warn_Image" Source="pack://application:,,,/Assets/Icon/Warn.png" Visibility="Hidden" />
Expand Down
12 changes: 10 additions & 2 deletions src/Update/Sucrose.Update/View/LightInfoBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal LightInfoBox(SSDEUT Type)
Info_Image.Visibility = Visibility.Visible;
break;
case SSDEUT.Update:
Success_Image.Visibility = Visibility.Visible;
Firework_Image.Visibility = Visibility.Visible;
break;
case SSDEUT.Status:
Warn_Image.Visibility = Visibility.Visible;
Expand All @@ -30,7 +30,7 @@ internal LightInfoBox(SSDEUT Type)
break;
case SSDEUT.Updating:
Countdown();
Success_Image.Visibility = Visibility.Visible;
Confetti_Image.Visibility = Visibility.Visible;
break;
case SSDEUT.Releases:
Warn_Image.Visibility = Visibility.Visible;
Expand All @@ -47,6 +47,14 @@ internal LightInfoBox(SSDEUT Type)

private async void Countdown()
{
Close_Button.Content = $"{SSRER.GetValue("Update", "InfoBox", "CloseText")} 5";

await Task.Delay(1000);

Close_Button.Content = $"{SSRER.GetValue("Update", "InfoBox", "CloseText")} 4";

await Task.Delay(1000);

Close_Button.Content = $"{SSRER.GetValue("Update", "InfoBox", "CloseText")} 3";

await Task.Delay(1000);
Expand Down

0 comments on commit a359665

Please sign in to comment.