Improve exercising view model documentation.
authorPiotr Czaja/Advanced Frameworks (PLT) /SRPOL/Engineer/Samsung Electronics <p.czaja@samsung.com>
Mon, 26 Jul 2021 11:21:24 +0000 (13:21 +0200)
committerPiotr Czaja <p.czaja@samsung.com>
Tue, 14 Sep 2021 11:01:34 +0000 (13:01 +0200)
Fitness/ViewModels/ExercisingViewModel.cs

index 100c931b07fad701f33515a28a2ebdde023b601b..bd2d6921cadbf6fd661a1a880138d27eecf5f665 100644 (file)
@@ -7,6 +7,9 @@ using Tizen.NUI.Binding;
 
 namespace Fitness.ViewModels
 {
+    /// <summary>
+    /// Class handling the exercising view.
+    /// </summary>
     public class ExercisingViewModel : ChangeWorkoutViewModel
     {
         private WorkoutState state;
@@ -16,6 +19,10 @@ namespace Fitness.ViewModels
         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);
@@ -47,12 +54,12 @@ namespace Fitness.ViewModels
         }
 
         /// <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)
                 {
@@ -63,12 +70,12 @@ namespace Fitness.ViewModels
         }
 
         /// <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)
                 {
@@ -79,12 +86,12 @@ namespace Fitness.ViewModels
         }
 
         /// <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)
                 {
@@ -95,12 +102,12 @@ namespace Fitness.ViewModels
         }
 
         /// <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
         {
@@ -116,17 +123,17 @@ namespace Fitness.ViewModels
         }
 
         /// <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; }
 
@@ -155,6 +162,9 @@ namespace Fitness.ViewModels
         /// </summary>
         public ICommand EndWorkout { get; private set; }
 
+        /// <summary>
+        /// Gets the pause/resume label.
+        /// </summary>
         public string PauseResumeLabel { get; private set; } = "Pause";
 
         /// <summary>
@@ -162,6 +172,7 @@ namespace Fitness.ViewModels
         /// </summary>
         public IExerciseService SquatService { get; private set; }
 
+        /// <inheritdoc />
         protected override void GoPrevious()
         {
             if (State == WorkoutState.Playing)
@@ -172,6 +183,7 @@ namespace Fitness.ViewModels
             Services.NavigationService.Instance.NavigateToSummaryView(SummaryType.ChangeToPreviousWorkout, CurrentWorkout);
         }
 
+        /// <inheritdoc />
         protected override void GoNext()
         {
             if (State == WorkoutState.Playing)