|
|
|
@ -2,6 +2,7 @@ using CommunityToolkit.Maui.Core.Primitives;
|
|
|
|
|
using Model;
|
|
|
|
|
using Model.Stub;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
|
|
|
|
namespace Linaris;
|
|
|
|
|
|
|
|
|
@ -111,9 +112,14 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
|
|
|
|
|
|
|
|
|
|
private void TimeSlider_ValueChanged(object sender, ValueChangedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if ((TimeSlider.Value * music.Duration.TotalSeconds) - music.Position.TotalSeconds <= 1 && (TimeSlider.Value * music.Duration.TotalSeconds) - music.Position.TotalSeconds >= -1)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
TimeSpan PositionTimeSpan = TimeSpan.FromSeconds(TimeSlider.Value * music.Duration.TotalSeconds);
|
|
|
|
|
music.SeekTo(PositionTimeSpan);
|
|
|
|
|
Position = music.Position.ToString(@"hh\:mm\:ss");
|
|
|
|
|
Duration = music.Duration.ToString(@"hh\:mm\:ss");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Music_StateChanged(object sender, MediaStateChangedEventArgs e)
|
|
|
|
@ -135,8 +141,8 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
|
|
|
|
|
Manager.PreviousTitle();
|
|
|
|
|
Dispatcher.DispatchAsync(() =>
|
|
|
|
|
{
|
|
|
|
|
CurrentPlaying = Manager.CurrentPlaying;
|
|
|
|
|
music.Source = CurrentPlaying.Path;
|
|
|
|
|
string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
|
|
|
|
|
music.Source = encodedFilePath;
|
|
|
|
|
Duration = music.Duration.ToString(@"hh\:mm\:ss");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -147,8 +153,8 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
|
|
|
|
|
Manager.NextTitle();
|
|
|
|
|
Dispatcher.DispatchAsync(() =>
|
|
|
|
|
{
|
|
|
|
|
CurrentPlaying = Manager.CurrentPlaying;
|
|
|
|
|
music.Source = CurrentPlaying.Path;
|
|
|
|
|
string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
|
|
|
|
|
music.Source = encodedFilePath;
|
|
|
|
|
Duration = music.Duration.ToString(@"hh\:mm\:ss");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -169,8 +175,8 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
|
|
|
|
|
Manager.NextTitle();
|
|
|
|
|
Dispatcher.DispatchAsync(() =>
|
|
|
|
|
{
|
|
|
|
|
CurrentPlaying = Manager.CurrentPlaying;
|
|
|
|
|
music.Source = CurrentPlaying.Path;
|
|
|
|
|
string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
|
|
|
|
|
music.Source = encodedFilePath;
|
|
|
|
|
Duration = music.Duration.ToString(@"hh\:mm\:ss");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|