mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Add playing status and times to view model
This commit is contained in:
@@ -4,6 +4,37 @@ namespace RedBookPlayer.GUI
|
||||
{
|
||||
public class PlayerViewModel : ReactiveObject
|
||||
{
|
||||
#region Player Status
|
||||
|
||||
private bool _playing;
|
||||
public bool Playing
|
||||
{
|
||||
get => _playing;
|
||||
set => this.RaiseAndSetIfChanged(ref _playing, value);
|
||||
}
|
||||
|
||||
private ulong _currentSector;
|
||||
public ulong CurrentSector
|
||||
{
|
||||
get => _currentSector;
|
||||
set => this.RaiseAndSetIfChanged(ref _currentSector, value);
|
||||
}
|
||||
|
||||
public int CurrentFrame => (int)(_currentSector / (75 * 60));
|
||||
public int CurrentSecond => (int)(_currentSector / 75 % 60);
|
||||
public int CurrentMinute => (int)(_currentSector % 75);
|
||||
|
||||
private ulong _totalSectors;
|
||||
public ulong TotalSectors
|
||||
{
|
||||
get => _totalSectors;
|
||||
set => this.RaiseAndSetIfChanged(ref _totalSectors, value);
|
||||
}
|
||||
|
||||
public int TotalFrames => (int)(_totalSectors / (75 * 60));
|
||||
public int TotalSeconds => (int)(_totalSectors / 75 % 60);
|
||||
public int TotalMinutes => (int)(_totalSectors % 75);
|
||||
|
||||
private int _volume;
|
||||
public int Volume
|
||||
{
|
||||
@@ -11,6 +42,10 @@ namespace RedBookPlayer.GUI
|
||||
set => this.RaiseAndSetIfChanged(ref _volume, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Disc Flags
|
||||
|
||||
private bool _applyDeEmphasis;
|
||||
public bool ApplyDeEmphasis
|
||||
{
|
||||
@@ -52,5 +87,7 @@ namespace RedBookPlayer.GUI
|
||||
get => _hiddenTrack;
|
||||
set => this.RaiseAndSetIfChanged(ref _hiddenTrack, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user