namespace Fitness.ViewModels
{
+ /// <summary>
+ /// Class handling the exercising view.
+ /// </summary>
public class ExercisingViewModel : ChangeWorkoutViewModel
{
private WorkoutState state;
private int repetitions;
private Landmark[,] poseLandmarks;
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ExercisingViewModel"/> class.
+ /// </summary>
+ /// <param name="workoutViewModel">Workout view model information.</param>
public ExercisingViewModel(WorkoutViewModel workoutViewModel)
{
PauseResumeWorkout = new Command(TriggerPauseResumeWorkout);
}
/// <summary>
- /// Current score.
+ /// Gets the property specifying the correctness of the exercise - values ranging from 0 to 100.
/// </summary>
public int Score
{
get => score;
- set
+ private set
{
if (value != score)
{
}
/// <summary>
- /// Repetitions made in current Workout
+ /// Gets the property specifying the number of repetitions of the exercise.
/// </summary>
public int Repetitions
{
get => repetitions;
- set
+ private set
{
if (value != repetitions)
{
}
/// <summary>
- /// Time left in current body pose to accept repetition.
+ /// Gets the property specifying the time of the exercise performed - values ranging from 0 to 5.
/// </summary>
public int Hold
{
get => hold;
- set
+ private set
{
if (value != hold)
{
}
/// <summary>
- /// TimeLeft in workout.
+ /// Gets the TimeLeft in workout.
/// </summary>
public TimeSpan TimeLeft { get; private set; } = TimeSpan.FromSeconds(27);
/// <summary>
- /// Current workout state
+ /// Gets the current workout state.
/// </summary>
public WorkoutState State
{
}
/// <summary>
- /// Pause workout
+ /// Gets the pause workout command.
/// </summary>
public ICommand Pause { get; private set; }
/// <summary>
- /// Url to video with workout
+ /// Gets the URL to video with workout.
/// </summary>
public string WorkoutVideoUrl { get; private set; }
/// <summary>
- /// Url to preview from device camera
+ /// Gets the URL to preview from device camera.
/// </summary>
public string PreviewVideoUrl { get; private set; }
/// </summary>
public ICommand EndWorkout { get; private set; }
+ /// <summary>
+ /// Gets the pause/resume label.
+ /// </summary>
public string PauseResumeLabel { get; private set; } = "Pause";
/// <summary>
/// </summary>
public IExerciseService SquatService { get; private set; }
+ /// <inheritdoc />
protected override void GoPrevious()
{
if (State == WorkoutState.Playing)
Services.NavigationService.Instance.NavigateToSummaryView(SummaryType.ChangeToPreviousWorkout, CurrentWorkout);
}
+ /// <inheritdoc />
protected override void GoNext()
{
if (State == WorkoutState.Playing)