Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulino committed May 11, 2024
1 parent 90ea526 commit a5ab010
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/AmbientSounds.Uwp/Assets/Data.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@
"MetaDataVersion": 6,
"Name": "fireplace",
"ColourHex": "#442f12",
"AssociatedVideoIds": [ "59c3b21c-3df1-44d0-a2f7-096bf55728c3" ],
"ImagePath": "ms-appx:///Assets/Images/fireplace.png",
"FilePath": "ms-appx:///Assets/Sounds/fireplace.wav",
"Attribution": "13_Fire in fireplace.wav by 16FThumaF -- https://freesound.org/s/499032/ -- License: Creative Commons 0. Photo by Oxana Lyashenko on Unsplash",
Expand Down Expand Up @@ -812,6 +813,7 @@
"Id": "f8424751-d150-41bc-b4ab-c22c41b4b339",
"MetaDataVersion": 6,
"Name": "underwater",
"AssociatedVideoIds": [ "b80f1e29-3649-4c59-8cbf-817ce6466e3f" ],
"ColourHex": "#00c3d0",
"ImagePath": "ms-appx:///Assets/Images/underwater.png",
"FilePath": "ms-appx:///Assets/Sounds/underwater.wav",
Expand Down Expand Up @@ -1086,6 +1088,7 @@
"Id": "38c73d89-6c2c-445b-8beb-52b2f72689a2",
"MetaDataVersion": 5,
"Name": "wind",
"AssociatedVideoIds": [ "04233954-8997-4ed0-8b6e-1a52643fbf67" ],
"ColourHex": "#0b2354",
"ImagePath": "ms-appx:///Assets/Images/wind.png",
"FilePath": "ms-appx:///Assets/Sounds/wind.wav",
Expand Down
8 changes: 8 additions & 0 deletions src/AmbientSounds.Uwp/Controls/Slideshow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Windows.UI.Xaml;
Expand Down Expand Up @@ -112,6 +113,7 @@ public async Task LoadAsync(string? soundIdToUse = null)

Image1.Visibility = Visibility.Visible;
Image2.Visibility = Visibility.Collapsed;
Debug.WriteLine("################# LoadAsync Image 1 fade in and slide starting");
_ = Image1FadeInAndSlide.StartAsync();

Image2Source = _images[_imageIndex2]; // Preload next
Expand All @@ -129,8 +131,10 @@ private async Task CycleImagesAsync()
if (Image1.Visibility is Visibility.Visible)
{
Image2.Visibility = Visibility.Visible;
Debug.WriteLine("################# CycleImagesAsync Image 2 fade in starting");
_ = Image2FadeInAndSlide.StartAsync();

Debug.WriteLine("################# CycleImagesAsync Image 1 fade out starting");
await Image1FadeOut.StartAsync();
Image1.Visibility = Visibility.Collapsed;

Expand All @@ -140,8 +144,10 @@ private async Task CycleImagesAsync()
else if (Image2.Visibility is Visibility.Visible)
{
Image1.Visibility = Visibility.Visible;
Debug.WriteLine("################# CycleImagesAsync Image 1 fade in starting");
_ = Image1FadeInAndSlide.StartAsync();

Debug.WriteLine("################# CycleImagesAsync Image 2 fade out starting");
await Image2FadeOut.StartAsync();
Image2.Visibility = Visibility.Collapsed;

Expand Down Expand Up @@ -212,10 +218,12 @@ private async Task HandleSoundChangeAsync()

if (Image1.Visibility is Visibility.Visible)
{
Debug.WriteLine("################# HandleSoundChange Image 1 fade out starting");
await Image1FadeOut.StartAsync();
}
else if (Image2.Visibility is Visibility.Visible)
{
Debug.WriteLine("################# HandleSoundChange Image 2 fade out starting");
await Image2FadeOut.StartAsync();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/AmbientSounds.Uwp/Views/XboxShellPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private void OnKeyDown(CoreWindow sender, KeyEventArgs args)
SoundGrid.Visibility = Visibility.Visible;
_ = ActionBarEntranceAnimation.StartAsync();
}
_timer.Start();
//_timer.Start();
}

public XboxShellPageViewModel ViewModel => (XboxShellPageViewModel)this.DataContext;
Expand Down

0 comments on commit a5ab010

Please sign in to comment.