[chronojump] Error message shown when try to calculate 1RM Any exercise with just one set



commit 52addb9cad895279f352b927fb3567ee3a4fb001
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Sep 15 15:24:24 2020 +0200

    Error message shown when try to calculate 1RM Any exercise with just one set

 src/gui/app1/encoder.cs | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index ccd3a484..ae34058a 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -2762,7 +2762,23 @@ public partial class ChronoJumpWindow
                                }
                        }
                } //end individual current session
-               
+
+               //1RM Any exercise cannot be calculated with just one set (needs different weights)
+               if(radio_encoder_analyze_individual_current_set.Active)
+               {
+                       if(encoderSelectedAnalysis == "1RM")
+                       {
+                               string nameTemp = 
Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_analyze_1RM),
+                                               encoderAnalyze1RMTranslation);
+                               if(nameTemp == "1RM Any exercise" || nameTemp == Catalog.GetString("1RM Any 
exercise"))
+                               {
+                                       new DialogMessage(Constants.MessageTypes.WARNING,
+                                                       Catalog.GetString("Sorry, cannot calculate this 1RM 
test on one set."));
+                                       return;
+                               }
+                       }
+               }
+
                if( ! radio_encoder_analyze_individual_current_set.Active)
                {
                        //cannot do inter/intra person with some cross graphs


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]