[chronojump] Fixed: MANY translated str at constants.cs didn't appear tr on software
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed: MANY translated str at constants.cs didn't appear tr on software
- Date: Wed, 7 Aug 2019 15:06:53 +0000 (UTC)
commit b9391ed0c5ce382e1e91bde877e6474f8cdfb44a
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Aug 7 17:05:42 2019 +0200
Fixed: MANY translated str at constants.cs didn't appear tr on software
po/ca.po | 2 +-
src/Mini/chronojump_mini.cs | 4 +-
src/chronojump.cs | 6 +-
src/constants.cs | 715 +++++++++++++++++++++++++------------
src/execute/jump.cs | 4 +-
src/execute/pulse.cs | 2 +-
src/execute/reactionTime.cs | 2 +-
src/execute/run.cs | 4 +-
src/gui/about.cs | 14 +-
src/gui/chronojump.cs | 44 +--
src/gui/dialogMessage.cs | 2 +-
src/gui/dialogPersonPopup.cs | 2 +-
src/gui/evaluator.cs | 4 +-
src/gui/forceSensor.cs | 4 +-
src/gui/forceSensorAnalyze.cs | 2 +-
src/gui/helpPorts.cs | 8 +-
src/gui/jumpType.cs | 2 +-
src/gui/jumpsProfile.cs | 2 +-
src/gui/networks.cs | 6 +-
src/gui/person.cs | 8 +-
src/gui/preferences.cs | 6 +-
src/gui/run.cs | 8 +-
src/gui/runEncoder.cs | 2 +-
src/gui/runType.cs | 2 +-
src/gui/session.cs | 2 +-
src/gui/splash.cs | 2 +-
src/gui/stats.cs | 120 +++----
src/multiChronopic.cs | 2 +-
src/sqlite/encoderConfiguration.cs | 4 +-
src/sqlite/main.cs | 4 +-
src/sqlite/stat.cs | 52 +--
src/statType.cs | 40 +--
src/stats/graphs/global.cs | 4 +-
src/stats/graphs/rjPotencyBosco.cs | 2 +-
src/stats/main.cs | 10 +-
src/stats/potency.cs | 44 +--
src/treeViewJump.cs | 8 +-
src/treeViewMultiChronopic.cs | 2 +-
src/treeViewPulse.cs | 4 +-
src/treeViewReactionTime.cs | 2 +-
src/treeViewRun.cs | 8 +-
src/util.cs | 14 +-
src/utilAll.cs | 2 +-
src/utilEncoder.cs | 12 +-
src/version31.cs | 7 +-
src/webcam/webcamFfmpeg.cs | 2 +-
src/webcam/webcamFfmpegDevices.cs | 6 +-
src/webcam/webcamMplayer.cs | 4 +-
48 files changed, 731 insertions(+), 481 deletions(-)
---
diff --git a/po/ca.po b/po/ca.po
index 29a63e10..8eddfe4f 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -181,7 +181,7 @@ msgstr "Comprovar la versió"
#: ../glade/app1.glade.h:34
msgid "_View"
-msgstr "_View"
+msgstr "_Veure"
#: ../glade/app1.glade.h:35 ../glade/preferences_win.glade.h:4
msgid "Persons on top"
diff --git a/src/Mini/chronojump_mini.cs b/src/Mini/chronojump_mini.cs
index 41d47e91..0f5f5bab 100644
--- a/src/Mini/chronojump_mini.cs
+++ b/src/Mini/chronojump_mini.cs
@@ -92,7 +92,7 @@ class ChronoJumpMini {
//string messageDetected ="";
if(UtilAll.IsWindows()) {
- messageInfo = Constants.PortNamesWindows;
+ messageInfo = Constants.PortNamesWindowsStr();
/*
messageDetected = Catalog.GetString("Detected ports:") + "\n";
@@ -103,7 +103,7 @@ class ChronoJumpMini {
}
*/
} else {
- messageInfo = Constants.PortNamesLinux;
+ messageInfo = Constants.PortNamesLinuxStr();
}
messageInfo += string.Format("\n" + Catalog.GetString("More information on Chronojump
manual"));
diff --git a/src/chronojump.cs b/src/chronojump.cs
index 1afb0cdc..2fe584e0 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -405,7 +405,7 @@ public class ChronoJump
//connect to server to Ping
versionAvailable = "";
- versionAvailable = Constants.ServerOffline;
+ versionAvailable = Constants.ServerOfflineStr();
//doing ping using json methods
@@ -431,7 +431,7 @@ public class ChronoJump
//TODO: fix this to the new code
string versionAvailableKnown = SqlitePreferences.Select("versionAvailable", true);
- if( versionAvailable != Constants.ServerOffline && new Version(versionAvailable) > new
Version(progVersion) ) {
+ if( versionAvailable != Constants.ServerOfflineStr() && new Version(versionAvailable) > new
Version(progVersion) ) {
//check if available version is higher than known available version
Version versionAvailableAsV = new Version(versionAvailable);
@@ -494,7 +494,7 @@ public class ChronoJump
}
private void on_find_version_cancelled(object o, EventArgs args) {
- versionAvailable = Constants.ServerOffline;
+ versionAvailable = Constants.ServerOfflineStr();
//pingEnd = true;
}
diff --git a/src/constants.cs b/src/constants.cs
index 437992de..989bb2be 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -28,52 +28,64 @@ public class Constants
//the strings created by Catalog cannot be const
//public static string ReadmeTranslators = Catalog.GetString("Translator, there's a glossary that
will help you in Chronojump translation:\n
http://git.gnome.org/browse/chronojump/plain/glossary/chronojump_glossary_for_translators.html");
-
- public static string [] AuthorsCEO = {
- "Xavier de Blas Foix (info chronojump org)\n",
- "Josep Ma Padullés (jmpadulles gmail com)"
- };
- public static string [] AuthorsSoftware = {
- "Xavier de Blas Foix (xaviblas gmail com)\n\t" +
- Catalog.GetString("Main developer.") + "\n",
- "Andoni Morales Alastruey (http://ylatuya.es)\n\t" +
- Catalog.GetString("Installation support: Autotools, packaging, bundle.") + "\n",
- "Carles Pina i Estany (http://pinux.info)\n\t" +
- Catalog.GetString("Backend developer.")
- };
- public static string [] AuthorsChronopic = {
- "Teng Wei Hua (wadedang gmail com)\n\t" + Catalog.GetString("Translation of Firmware to C.")
+ "\n\t" +
- Catalog.GetString("New firmware features.") + " " + Catalog.GetString("Encoder
hardware layer.") + "\n",
- "Juan Gonzalez Gómez (http://www.iearobotics.com)\n\t" + Catalog.GetString("Skypic,
Chronopic, connection between hardware and software.") + "\n",
- "Ferran Suárez Rodríguez (ferransuarez2 gmail com)\n\t" + Catalog.GetString("Chronopic
reaction time advanced implementation.") + "\n",
- "Ricardo Gómez González (http://www.iearobotics.com)\n\t" + Catalog.GetString("Chronopic3
industrial prototype.") + "\n",
- "Juan Fernando Pardo (juanfer juanfer com ar)\n\t" + "Chronopic2."
- };
- public static string [] AuthorsDevices = {
- "Josep Ma Padullés (jmpadulles gmail com)\n",
- "Anna Padullés (hardware chronojump org)\n",
- "Xavier Padullés (testing chronojump org)\n",
- "Teng Wei Hua (wadedang gmail com)\n",
- "Xavier de Blas Foix (info chronojump org)\n",
- "Ferran Suárez Rodríguez (ferransuarez2 gmail com)\n"
- };
- public static string [] AuthorsMath = {
- "Carlos J. Gil Bellosta (http://www.datanalytics.com)\n",
- "Aleix Ruiz de Villa (aleixrvr gmail com)\n",
- "Xavier Padullés (testing chronojump org)"
- };
- public static string [] AuthorsOpenCV = {
- "Sharad Shankar (http://www.logicbrick.com)\n",
- "Onkar Nath Mishra (http://www.logicbrick.com)\n"
- };
- public static string [] Documenters = {
- "Xavier de Blas Foix (xaviblas gmail com)\n\t" +
- Catalog.GetString("Chronojump Manual author."),
- "Helena Olsson (hjolsson gmail com)\n\t" +
- Catalog.GetString("Chronojump Manual English translation."),
- "Xavier Padullés (testing chronojump org)",
- };
+ public enum AuthorsEnum { CEO, SOFTWARE, CHRONOPIC, DEVICES, MATH, OPENCV, DOCUMENTERS }
+ public static string [] Authors(AuthorsEnum e)
+ {
+ if(e == AuthorsEnum.CEO)
+ return new String []{
+ "Xavier de Blas Foix (info chronojump org)\n",
+ "Josep Ma Padullés (jmpadulles gmail com)"
+ };
+ else if(e == AuthorsEnum.SOFTWARE)
+ return new String []{
+ "Xavier de Blas Foix (xaviblas gmail com)\n\t" +
+ Catalog.GetString("Main developer.") + "\n",
+ "Andoni Morales Alastruey (http://ylatuya.es)\n\t" +
+ Catalog.GetString("Installation support: Autotools,
packaging, bundle.") + "\n",
+ "Carles Pina i Estany (http://pinux.info)\n\t" +
+ Catalog.GetString("Backend developer.")
+ };
+ else if(e == AuthorsEnum.CHRONOPIC)
+ return new String []{
+ "Teng Wei Hua (wadedang gmail com)\n\t" + Catalog.GetString("Translation of
Firmware to C.") + "\n\t" +
+ Catalog.GetString("New firmware features.") + " " +
Catalog.GetString("Encoder hardware layer.") + "\n",
+ "Juan Gonzalez Gómez (http://www.iearobotics.com)\n\t" +
Catalog.GetString("Skypic, Chronopic, connection between hardware and software.") + "\n",
+ "Ferran Suárez Rodríguez (ferransuarez2 gmail com)\n\t" +
Catalog.GetString("Chronopic reaction time advanced implementation.") + "\n",
+ "Ricardo Gómez González (http://www.iearobotics.com)\n\t" +
Catalog.GetString("Chronopic3 industrial prototype.") + "\n",
+ "Juan Fernando Pardo (juanfer juanfer com ar)\n\t" + "Chronopic2."
+ };
+ else if(e == AuthorsEnum.DEVICES)
+ return new String []{
+ "Josep Ma Padullés (jmpadulles gmail com)\n",
+ "Anna Padullés (hardware chronojump org)\n",
+ "Xavier Padullés (testing chronojump org)\n",
+ "Teng Wei Hua (wadedang gmail com)\n",
+ "Xavier de Blas Foix (info chronojump org)\n",
+ "Ferran Suárez Rodríguez (ferransuarez2 gmail com)\n"
+ };
+ else if(e == AuthorsEnum.MATH)
+ return new String []{
+ "Carlos J. Gil Bellosta (http://www.datanalytics.com)\n",
+ "Aleix Ruiz de Villa (aleixrvr gmail com)\n",
+ "Xavier Padullés (testing chronojump org)"
+ };
+ else if(e == AuthorsEnum.OPENCV)
+ return new String []{
+ "Sharad Shankar (http://www.logicbrick.com)\n",
+ "Onkar Nath Mishra (http://www.logicbrick.com)\n"
+ };
+ else if(e == AuthorsEnum.DOCUMENTERS)
+ return new String []{
+ "Xavier de Blas Foix (xaviblas gmail com)\n\t" +
+ Catalog.GetString("Chronojump Manual author."),
+ "Helena Olsson (hjolsson gmail com)\n\t" +
+ Catalog.GetString("Chronojump Manual English translation."),
+ "Xavier Padullés (testing chronojump org)",
+ };
+ else
+ return new String []{""};
+ }
public static string ChronojumpWebsite = "http://www.chronojump.org";
@@ -84,8 +96,11 @@ public class Constants
public static string DjIndexFormulaOnly = "(tv-tc)*100/(tc*1.0)"; //*1.0 for having double division
public static string QIndexFormulaOnly = "tv/(tc*1.0)"; //*1.0 for having double division
public static string DjPowerFormulaOnly = PersonSessionTable + ".weight * 9.81 * (fall/100.0 + 1.226
* (tv*tv) ) / ((tc+tv)*1.0)";
-
- public static string ChronojumpProfile = Catalog.GetString("Chronojump profile");
+
+ public static string ChronojumpProfileStr()
+ {
+ return Catalog.GetString("Chronojump profile");
+ }
public const string FvIndexFormula = "F/V sj+(100%)/sj *100";
public const string IeIndexFormula = "IE (cmj-sj)/sj *100";
public const string IRnaIndexFormula = "IRna (djna-cmj)/cmj *100";
@@ -196,24 +211,45 @@ public class Constants
//simulated tests and SIMULATED session
public const string SessionSimulatedName = "SIMULATED"; //Do NOT translate this
- public static string SessionProtected = Catalog.GetString("Sorry, this session cannot be modified.");
//SIMULATED session
- public static string SimulatedTestsNotAllowed = Catalog.GetString("Chronopic is disconnected.") +
"\n\n" +
- string.Format(Catalog.GetString("If you want to simulate tests, use {0} session."),
"SIMULATED");
+ public static string SessionProtectedStr()
+ {
+ return Catalog.GetString("Sorry, this session cannot be modified."); //SIMULATED session
+ }
+ public static string SimulatedTestsNotAllowedStr()
+ {
+ return Catalog.GetString("Chronopic is disconnected.") + "\n\n" +
+ string.Format(Catalog.GetString("If you want to simulate tests, use {0} session."),
"SIMULATED");
+ }
//Compujump strings
- public static string RFIDDisconnectedMessage = Catalog.GetString("RFID cable has been disconnected!")
+ "\n\n" +
- Catalog.GetString("Please, connect it and restart Chronojump.");
- public static string RFIDNotInServerMessage = Catalog.GetString("This RFID is not registered on
server.");
- public static string ServerDisconnectedMessage = Catalog.GetString("Server is disconnected.");
+ public static string RFIDDisconnectedMessage()
+ {
+ return Catalog.GetString("RFID cable has been disconnected!") + "\n\n" +
+ Catalog.GetString("Please, connect it and restart Chronojump.");
+ }
+ public static string RFIDNotInServerMessage()
+ {
+ return Catalog.GetString("This RFID is not registered on server.");
+ }
+ public static string ServerDisconnectedMessage()
+ {
+ return Catalog.GetString("Server is disconnected.");
+ }
//server
public const string ServerPingTable = "SPing";
public const string ServerEvaluatorTable = "SEvaluator";
public const string IPUnknown = "Unknown";
public static int ServerUndefinedID = -1;
- public static string ServerOnline = Catalog.GetString("Server is connected.");
- public static string ServerOffline = Catalog.GetString("Sorry, server is currently offline. Try
later.") + "\n" +
- Catalog.GetString("Or maybe you are not connected to the Internet or your firewall is
restricting connections");
+ public static string ServerOnlineStr()
+ {
+ return Catalog.GetString("Server is connected.");
+ }
+ public static string ServerOfflineStr()
+ {
+ return Catalog.GetString("Sorry, server is currently offline. Try later.") + "\n" +
+ Catalog.GetString("Or maybe you are not connected to the Internet or your firewall is
restricting connections");
+ }
public enum ServerSessionStates {
NOTHING, UPLOADINGSESSION, UPLOADINGDATA, DONE
}
@@ -236,23 +272,35 @@ public class Constants
public const string DeviceContactSteel = "Contact platform (steel)";
public const string DeviceContactCircuit = "Contact platform (circuit board)";
public const string DeviceInfrared = "Infrared";
- public static string [] Devices = {
- UndefinedDefault + ":" + Catalog.GetString(UndefinedDefault),
- DeviceContactSteel + ":" + Catalog.GetString(DeviceContactSteel),
- DeviceContactCircuit + ":" + Catalog.GetString(DeviceContactCircuit),
- DeviceInfrared + ":" + Catalog.GetString(DeviceInfrared),
- "Other" + ":" + Catalog.GetString("Other"),
- };
-
+ public static string [] Devices ()
+ {
+ return new string[] {
+ UndefinedDefault + ":" + Catalog.GetString(UndefinedDefault),
+ DeviceContactSteel + ":" + Catalog.GetString(DeviceContactSteel),
+ DeviceContactCircuit + ":" + Catalog.GetString(DeviceContactCircuit),
+ DeviceInfrared + ":" + Catalog.GetString(DeviceInfrared),
+ "Other" + ":" + Catalog.GetString("Other"),
+ };
+ }
public static string MultiChronopicName = "MultiChronopic";
public static string RunAnalysisName = "RunAnalysis"; //Josep Ma Padullés test
public static string TakeOffName = "TakeOff"; //translate (take off?)
public static string TakeOffWeightName = "TakeOffWeight"; //translate (take off?)
- public static string SoftwareUpdated = Catalog.GetString("Your software is updated!");
- public static string SoftwareNeedUpdate = Catalog.GetString("Update software at ") +
"www.chronojump.org";
- public static string SoftwareNewerThanPublised = "Your software is more updated than last published
version.\n\nPlease, don't Update!";
+ public static string SoftwareUpdated = "Your software is updated!";
+ public static string SoftwareUpdatedStr()
+ {
+ return Catalog.GetString("Your software is updated!");
+ }
+ public static string SoftwareNeedUpdateStr()
+ {
+ return string.Format(Catalog.GetString("Update software at {0}"), "www.chronojump.org");
+ }
+ public static string SoftwareNewerThanPublisedStr()
+ {
+ return Catalog.GetString("Your software is more updated than last published
version.\n\nPlease, don't Update!");
+ }
public static string GetSpreadsheetString(string CSVExportDecimalSeparator)
{
@@ -265,17 +313,25 @@ public class Constants
Catalog.GetString("This can be changed at preferences.");
}
- public static string JumpsProfileNeededJumps = Catalog.GetString("Please, perform the needed jumps
marked in red above.");
+ public static string JumpsProfileNeededJumpsStr()
+ {
+ return Catalog.GetString("Please, perform the needed jumps marked in red above.");
+ }
/* OLD, check this
public static string PotencyLewisCMJFormula = Catalog.GetString("Peak Power")+ " CMJ (Lewis) " +
"(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") + ")*9.81*" +
"SQRT(2*9,81* " + Catalog.GetString("height") + "(m))";
*/
- public static string PotencyLewisFormulaShort = Catalog.GetString("Peak power") + " (Lewis, 1974) " +
- Catalog.GetString("(Watts)");
- public static string PotencyLewisFormula = PotencyLewisFormulaShort + "\n" +
- "(SQRT(4,9)*9,8*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ") * SQRT(" + Catalog.GetString("height") + "(m)))";
+ public static string PotencyLewisFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Lewis, 1974) " + Catalog.GetString("(Watts)");
+ }
+ public static string PotencyLewisFormulaStr()
+ {
+ return PotencyLewisFormulaShortStr() + "\n" +
+ "(SQRT(4,9)*9,8*(" + Catalog.GetString("body weight") + "+" +
Catalog.GetString("extra weight") + ") * SQRT(" + Catalog.GetString("height") + "(m)))";
+ }
//see: http://www.dtic.mil/cgi-bin/GetTRDoc?AD=ADA218194&Location=U2&doc=GetTRDoc.pdf
//Estimation of human power output from maximal vertical jump and body mass
//1988
@@ -306,77 +362,136 @@ public class Constants
//newtons, yielding power in watts (N.m/s).
//POWERw = (SQRT(4.9))(9.8)(BODY MASSkg)(SQRT(JUMP-REACH SCOREm)) (2)
- public static string PotencyHarmanFormulaShort = Catalog.GetString("Peak power") + " (Harman, 1991)";
- public static string PotencyHarmanFormula = PotencyHarmanFormulaShort + "\n" +
- "(61.9*" + Catalog.GetString("height") + "(cm))" +
- "+ (36*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") + "))
-1822";
-
- public static string PotencySayersSJFormulaShort = Catalog.GetString("Peak power") + " SJ (Sayers,
1999)";
- public static string PotencySayersSJFormula = PotencySayersSJFormulaShort + "\n" +
- "(60.7*" + Catalog.GetString("height") + "(cm))" +
- "+ (45.3*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
")) -2055";
-
- public static string PotencySayersCMJFormulaShort = Catalog.GetString("Peak power") + " CMJ (Sayers,
1999)";
- public static string PotencySayersCMJFormula = PotencySayersCMJFormulaShort + "\n" +
- "(51.9*" + Catalog.GetString("height") + "(cm))" +
- "+ (48.9*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
")) -2007";
+ public static string PotencyHarmanFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Harman, 1991)";
+ }
+ public static string PotencyHarmanFormulaStr()
+ {
+ return PotencyHarmanFormulaShortStr() + "\n" +
+ "(61.9*" + Catalog.GetString("height") + "(cm))" +
+ "+ (36*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -1822";
+ }
+
+ public static string PotencySayersSJFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " SJ (Sayers, 1999)";
+ }
+ public static string PotencySayersSJFormulaStr()
+ {
+ return PotencySayersSJFormulaShortStr() + "\n" +
+ "(60.7*" + Catalog.GetString("height") + "(cm))" +
+ "+ (45.3*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -2055";
+ }
+
+ public static string PotencySayersCMJFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " CMJ (Sayers, 1999)";
+ }
+ public static string PotencySayersCMJFormulaStr()
+ {
+ return PotencySayersCMJFormulaShortStr() + "\n" +
+ "(51.9*" + Catalog.GetString("height") + "(cm))" +
+ "+ (48.9*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -2007";
+ }
//http://www.ncbi.nlm.nih.gov/pubmed/14658372
- public static string PotencyShettyFormulaShort = Catalog.GetString("Peak power") + " (Shetty, 2002)";
- public static string PotencyShettyFormula = PotencyShettyFormulaShort + "\n" +
- "(1925.72*" + Catalog.GetString("height") + "(m))" +
- "+ (14.74*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
")) -666.3";
-
- public static string PotencyCanavanFormulaShort = Catalog.GetString("Peak power") + " (Canavan,
2004)";
- public static string PotencyCanavanFormula = PotencyCanavanFormulaShort + "\n" +
- "(65.1*" + Catalog.GetString("height") + "(cm))" +
- "+ (25.8*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
")) -1413.1";
-
+ public static string PotencyShettyFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Shetty, 2002)";
+ }
+ public static string PotencyShettyFormulaStr()
+ {
+ return PotencyShettyFormulaShortStr() + "\n" +
+ "(1925.72*" + Catalog.GetString("height") + "(m))" +
+ "+ (14.74*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -666.3";
+ }
+
+ public static string PotencyCanavanFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Canavan, 2004)";
+ }
+ public static string PotencyCanavanFormulaStr()
+ {
+ return PotencyCanavanFormulaShortStr() + "\n" +
+ "(65.1*" + Catalog.GetString("height") + "(cm))" +
+ "+ (25.8*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -1413.1";
+ }
+
/*
- public static string PotencyBahamondeFormula = Catalog.GetString("Peak power") + " (Bahamonde, 2005)
\n" +
- "(78.5*" + Catalog.GetString("height") + "(cm))" +
- "+ (60.6*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
- ")) -(15.3*" + Catalog.GetString("height") + "(cm)) -1413.1";
- */ //what is this height?
-
- public static string PotencyLaraMaleApplicantsSCFormulaShort =
- Catalog.GetString("Peak power") + " (Lara, 2006, m)";
- public static string PotencyLaraMaleApplicantsSCFormula = PotencyLaraMaleApplicantsSCFormulaShort +
- " (" + Catalog.GetString("Male applicants to a Faculty of Sport Sciences") + ") \n" +
- "(62.5*" + Catalog.GetString("height") + "(cm))" +
- "+ (50.3*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
")) -2184.7";
-
- public static string PotencyLaraFemaleEliteVoleiFormulaShort =
- Catalog.GetString("Peak power") + " (Lara, 2006, fev)";
- public static string PotencyLaraFemaleEliteVoleiFormula = PotencyLaraFemaleEliteVoleiFormulaShort +
- " (" + Catalog.GetString("Female elite volleyball") + ") \n" +
- "(83.1*" + Catalog.GetString("height") + "(cm))" +
- "+ (42*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") + "))
-2488";
-
- public static string PotencyLaraFemaleMediumVoleiFormulaShort =
- Catalog.GetString("Peak power") + " (Lara, 2006, fmv)";
- public static string PotencyLaraFemaleMediumVoleiFormula = PotencyLaraFemaleMediumVoleiFormulaShort +
- " (" + Catalog.GetString("Female medium volleyball") + ") \n" +
- "(53.6*" + Catalog.GetString("height") + "(cm))" +
- "+ (67.5*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
")) -2624.1";
+ public static string PotencyBahamondeFormula = Catalog.GetString("Peak power") + " (Bahamonde,
2005) \n" +
+ "(78.5*" + Catalog.GetString("height") + "(cm))" +
+ "+ (60.6*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
+ ")) -(15.3*" + Catalog.GetString("height") + "(cm)) -1413.1";
+ */ //what is this height?
+
+ public static string PotencyLaraMaleApplicantsSCFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Lara, 2006, m)";
+ }
+ public static string PotencyLaraMaleApplicantsSCFormulaStr()
+ {
+ return PotencyLaraMaleApplicantsSCFormulaShortStr() +
+ " (" + Catalog.GetString("Male applicants to a Faculty of Sport Sciences") + ") \n" +
+ "(62.5*" + Catalog.GetString("height") + "(cm))" +
+ "+ (50.3*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -2184.7";
+ }
+
+ public static string PotencyLaraFemaleEliteVoleiFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Lara, 2006, fev)";
+ }
+ public static string PotencyLaraFemaleEliteVoleiFormulaStr()
+ {
+ return PotencyLaraFemaleEliteVoleiFormulaShortStr() +
+ " (" + Catalog.GetString("Female elite volleyball") + ") \n" +
+ "(83.1*" + Catalog.GetString("height") + "(cm))" +
+ "+ (42*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -2488";
+ }
- public static string PotencyLaraFemaleSCStudentsFormulaShort =
- Catalog.GetString("Peak power") + " (Lara, 2006, fsc)";
- public static string PotencyLaraFemaleSCStudentsFormula = PotencyLaraFemaleSCStudentsFormulaShort +
- " (" + Catalog.GetString("Peak power") + " (Lara, 2006, " +
- Catalog.GetString("Female sports sciences students") + ") \n" +
- "(56.7*" + Catalog.GetString("height") + "(cm))" +
- "+ (47.2*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
")) -1772.6";
+ public static string PotencyLaraFemaleMediumVoleiFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Lara, 2006, fmv)";
+ }
+ public static string PotencyLaraFemaleMediumVoleiFormulaStr()
+ {
+ return PotencyLaraFemaleMediumVoleiFormulaShortStr() +
+ " (" + Catalog.GetString("Female medium volleyball") + ") \n" +
+ "(53.6*" + Catalog.GetString("height") + "(cm))" +
+ "+ (67.5*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -2624.1";
+ }
+
+ public static string PotencyLaraFemaleSCStudentsFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Lara, 2006, fsc)";
+ }
+ public static string PotencyLaraFemaleSCStudentsFormulaStr()
+ {
+ return PotencyLaraFemaleSCStudentsFormulaShortStr() +
+ " (" + Catalog.GetString("Peak power") + " (Lara, 2006, " +
+ Catalog.GetString("Female sports sciences students") + ") \n" +
+ "(56.7*" + Catalog.GetString("height") + "(cm))" +
+ "+ (47.2*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -1772.6";
+ }
- public static string PotencyLaraFemaleSedentaryFormulaShort = Catalog.GetString("Peak power") + "
(Lara, 2006, fu)";
- public static string PotencyLaraFemaleSedentaryFormula = PotencyLaraFemaleSedentaryFormulaShort +
- " (" + Catalog.GetString("Peak power") + " (Lara, 2006, " + Catalog.GetString("Female
university students") + ") \n" +
- "(68.2*" + Catalog.GetString("height") + "(cm))" +
- "+ (40.8*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") +
")) -1731.1";
+ public static string PotencyLaraFemaleSedentaryFormulaShortStr()
+ {
+ return Catalog.GetString("Peak power") + " (Lara, 2006, fu)";
+ }
+ public static string PotencyLaraFemaleSedentaryFormulaStr()
+ {
+ return PotencyLaraFemaleSedentaryFormulaShortStr() +
+ " (" + Catalog.GetString("Peak power") + " (Lara, 2006, " + Catalog.GetString("Female
university students") + ") \n" +
+ "(68.2*" + Catalog.GetString("height") + "(cm))" +
+ "+ (40.8*(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra
weight") + ")) -1731.1";
+ }
public static string RJPotencyBoscoFormula = "Peak Power" + " (Bosco)" + " 9.81^2*TF*TT /
(4*jumps*(TT-TF))";
public static string RJPotencyBoscoFormulaOnly = "9.81*9.81 * tvavg*jumps * time / ( 4.0 * jumps *
(time - tvavg*jumps) )"; //*4.0 for having double division
- public static string RJPotencyBoscoName = Catalog.GetString("Peak Power") + " (Bosco)";
+ public static string RJPotencyBoscoNameStr()
+ {
+ return Catalog.GetString("Peak Power") + " (Bosco)";
+ }
public static string RjIndexName = "Rj Index";
public static string RjIndexFormulaOnly = "(tvavg-tcavg)*100/(tcavg * 1.0)";
@@ -388,18 +503,50 @@ public class Constants
//global stat types
- public static string TypeSessionSummary = Catalog.GetString("Session summary");
- public static string TypeJumperSummary = Catalog.GetString("Jumper summary");
- public static string TypeJumpsSimple = Catalog.GetString("Simple");
- public static string TypeJumpsSimpleWithTC = Catalog.GetString("Simple with TC");
- public static string TypeJumpsReactive = Catalog.GetString("Jumps: Reactive");
- public static string TypeRunsSimple = Catalog.GetString("Races: Simple");
- public static string TypeRunsIntervallic = Catalog.GetString("Races: Intervallic");
+ public static string TypeSessionSummaryStr()
+ {
+ return Catalog.GetString("Session summary");
+ }
+ public static string TypeJumperSummaryStr()
+ {
+ return Catalog.GetString("Jumper summary");
+ }
+ public static string TypeJumpsSimpleStr()
+ {
+ return Catalog.GetString("Simple");
+ }
+ public static string TypeJumpsSimpleWithTCStr()
+ {
+ return Catalog.GetString("Simple with TC");
+ }
+ public static string TypeJumpsReactiveStr()
+ {
+ return Catalog.GetString("Jumps: Reactive");
+ }
+ public static string TypeRunsSimpleStr()
+ {
+ return Catalog.GetString("Races: Simple");
+ }
+
+ public static string TypeRunsIntervallicStr()
+ {
+ return Catalog.GetString("Races: Intervallic");
+ }
+
//strings
- public static string AllJumpsName = Catalog.GetString("See all jumps");
- public static string AllRunsName = Catalog.GetString("See all races");
- public static string AllPulsesName = Catalog.GetString("See all pulses");
+ public static string AllJumpsNameStr()
+ {
+ return Catalog.GetString("See all jumps");
+ }
+ public static string AllRunsNameStr()
+ {
+ return Catalog.GetString("See all races");
+ }
+ public static string AllPulsesNameStr()
+ {
+ return Catalog.GetString("See all pulses");
+ }
//fileNames
//public static string FileNameLogo = "chronojump-boscosystem_white_bg.png";
@@ -425,8 +572,11 @@ public class Constants
GraphTypeXY, GraphTypeDotchart, GraphTypeStripchart };
public static string [] GraphTypesMultisession = { GraphTypeBarplot, GraphTypeLines };
public static string GraphPaletteGray = "gray.colors";
- public static string GraphPaletteBlack = Catalog.GetString("black only");
- public static string [] GraphPalettes = { GraphPaletteBlack, GraphPaletteGray, "rainbow",
+ public static string GraphPaletteBlackStr()
+ {
+ return Catalog.GetString("black only");
+ }
+ public static string [] GraphPalettes = { GraphPaletteBlackStr(), GraphPaletteGray, "rainbow",
"topo.colors", "heat.colors", "terrain.colors", "cm.colors"};
@@ -520,31 +670,64 @@ public class Constants
};
- public static string PortNamesWindows =
- string.Format(Catalog.GetString("Typical serial and USB-serial ports on Windows:") +
+ public static string PortNamesWindowsStr()
+ {
+ return string.Format(Catalog.GetString("Typical serial and USB-serial ports on Windows:") +
"\n\t<i>COM1\tCOM2</i>\n\n" +
Catalog.GetString("Also, these are possible:") +
"\t<i>COM3 ... COM27</i>");
-
- public static string PortNamesLinux =
- string.Format(Catalog.GetString("Typical serial ports on GNU/Linux:") +
+ }
+
+
+ public static string PortNamesLinuxStr()
+ {
+ return string.Format(Catalog.GetString("Typical serial ports on GNU/Linux:") +
"\t<i>/dev/ttyS0\t/dev/ttyS1</i>\n" +
Catalog.GetString("Typical USB-serial ports on GNU/Linux:") +
"\t<i>/dev/ttyUSB0\t/dev/ttyUSB1</i>" + "\n" +
Catalog.GetString("If you use Chronopic3, you will have an USB-serial port.")
);
+ }
- public static string FoundSerialPortsString = Catalog.GetString("Serial ports found:");
- public static string FoundUSBSerialPortsString = Catalog.GetString("USB-serial ports found:");
- public static string NotFoundUSBSerialPortsString = Catalog.GetString("Not found any USB-serial
ports.") + " " + Catalog.GetString("Is Chronopic connected?");
+ public static string FoundSerialPortsString()
+ {
+ return Catalog.GetString("Serial ports found:");
+ }
+ public static string FoundUSBSerialPortsString()
+ {
+ return Catalog.GetString("USB-serial ports found:");
+ }
+ public static string NotFoundUSBSerialPortsString()
+ {
+ return Catalog.GetString("Not found any USB-serial ports.") + " " + Catalog.GetString("Is
Chronopic connected?");
+ }
- public static string ChronopicDetecting = Catalog.GetString("Detecting ...");
- public static string ChronopicNeedTouch = Catalog.GetString("Touch device.");
+ public static string ChronopicDetectingStr()
+ {
+ return Catalog.GetString("Detecting ...");
+ }
+ public static string ChronopicNeedTouchStr()
+ {
+ return Catalog.GetString("Touch device.");
+ }
+
+ public static string FindDriverNeedStr()
+ {
+ return Catalog.GetString("Chronopic driver has to be installed.");
+ }
- public static string FindDriverNeed = Catalog.GetString("Chronopic driver has to be installed.");
- public static string FindDriverWindows = Catalog.GetString("If you have problems connecting with
Chronopic, ensure you have the <b>driver</b> installed at 'Windows Start Menu / Chronojump / Install
Chronopic driver'.");
- public static string FindDriverOthers = Catalog.GetString("Check Chronojump software website.");
- public static string VideoNothingCaptured = Catalog.GetString("Error. Nothing has been captured.");
+ public static string FindDriverWindowsStr()
+ {
+ return Catalog.GetString("If you have problems connecting with Chronopic, ensure you have the
<b>driver</b> installed at 'Windows Start Menu / Chronojump / Install Chronopic driver'.");
+ }
+ public static string FindDriverOthersStr()
+ {
+ return Catalog.GetString("Check Chronojump software website.");
+ }
+ public static string VideoNothingCapturedStr()
+ {
+ return Catalog.GetString("Error. Nothing has been captured.");
+ }
// public static System.Media.SystemSound SoundCanStart = System.Media.SystemSounds.Question;
// public static System.Media.SystemSounds SoundGood = System.Media.SystemSounds.Exclamation;
@@ -584,25 +767,43 @@ public class Constants
public static int CountryUndefinedID = 1;
public static string CountryUndefined = "Undefined";
public static string ContinentUndefined = "Undefined";
- public static string [] Continents = {
- ContinentUndefined + ":" + Catalog.GetString(ContinentUndefined),
- "Africa" + ":" + Catalog.GetString("Africa"),
- "Antarctica" + ":" + Catalog.GetString("Antarctica"),
- "Asia" + ":" + Catalog.GetString("Asia"),
- "Europe" + ":" + Catalog.GetString("Europe"),
- "North America" + ":" + Catalog.GetString("North America"),
- "Oceania" + ":" + Catalog.GetString("Oceania"),
- "South America" + ":" + Catalog.GetString("South America"),
- };
-
+ public static string [] ContinentsStr()
+ {
+ return new string [] {
+ ContinentUndefined + ":" + Catalog.GetString(ContinentUndefined),
+ "Africa" + ":" + Catalog.GetString("Africa"),
+ "Antarctica" + ":" + Catalog.GetString("Antarctica"),
+ "Asia" + ":" + Catalog.GetString("Asia"),
+ "Europe" + ":" + Catalog.GetString("Europe"),
+ "North America" + ":" + Catalog.GetString("North America"),
+ "Oceania" + ":" + Catalog.GetString("Oceania"),
+ "South America" + ":" + Catalog.GetString("South America"),
+ };
+ }
+
public static int Simulated = -1;
- public static string SimulatedMessage = Catalog.GetString("Tests are <b>simulated</b> until Chronopic
is connected.");
- public static string SimulatedTreeview = " (" + Catalog.GetString("Simulated") + ")";
-
- public static string ChronopicOne = Catalog.GetString("All tests available except MultiChronopic.");
- public static string ChronopicMore = Catalog.GetString("All tests available.");
+ public static string SimulatedMessage()
+ {
+ return Catalog.GetString("Tests are <b>simulated</b> until Chronopic is connected.");
+ }
+ public static string SimulatedTreeviewStr()
+ {
+ return " (" + Catalog.GetString("Simulated") + ")";
+ }
- public static string DefaultString = Catalog.GetString("Default");
+ public static string ChronopicOneStr()
+ {
+ return Catalog.GetString("All tests available except MultiChronopic.");
+ }
+ public static string ChronopicMoreStr()
+ {
+ return Catalog.GetString("All tests available.");
+ }
+
+ public static string DefaultString()
+ {
+ return Catalog.GetString("Default");
+ }
//levels of sport practice
//int will go into person database
@@ -611,13 +812,16 @@ public class Constants
public static string LevelUndefined = "Undefined";
public static int LevelSedentaryID = 0;
public static string LevelSedentary = "Sedentary/Occasional practice";
- public static string [] Levels = {
- LevelUndefinedID.ToString() + ":" + Catalog.GetString(LevelUndefined),
- LevelSedentaryID.ToString() + ":" + Catalog.GetString(LevelSedentary),
- "1:" + Catalog.GetString("Regular practice"),
- "2:" + Catalog.GetString("Competition"),
- "3:" + Catalog.GetString("Elite"),
- };
+ public static string [] LevelsStr()
+ {
+ return new string [] {
+ LevelUndefinedID.ToString() + ":" + Catalog.GetString(LevelUndefined),
+ LevelSedentaryID.ToString() + ":" + Catalog.GetString(LevelSedentary),
+ "1:" + Catalog.GetString("Regular practice"),
+ "2:" + Catalog.GetString("Competition"),
+ "3:" + Catalog.GetString("Elite"),
+ };
+ }
public static string [] SplashMessages = {
"Initializing", //0
@@ -633,12 +837,30 @@ public class Constants
"Starting main window", //10
};
- public static string DatabaseNotFound = Catalog.GetString("Error. Cannot find database.");
- public static string WebsiteNotFound = Catalog.GetString("Sorry, cannot open website.");
- public static string DirectoryCannotOpen = Catalog.GetString("Error. Cannot open directory.");
- public static string FileNotFound = Catalog.GetString("Error. File not found.");
- public static string FileCopyProblem = Catalog.GetString("Error. Cannot copy file.");
- public static string FileCannotSave = Catalog.GetString("Error. File cannot be saved.");
+ public static string DatabaseNotFoundStr()
+ {
+ return Catalog.GetString("Error. Cannot find database.");
+ }
+ public static string WebsiteNotFoundStr()
+ {
+ return Catalog.GetString("Sorry, cannot open website.");
+ }
+ public static string DirectoryCannotOpenStr()
+ {
+ return Catalog.GetString("Error. Cannot open directory.");
+ }
+ public static string FileNotFoundStr()
+ {
+ return Catalog.GetString("Error. File not found.");
+ }
+ public static string FileCopyProblemStr()
+ {
+ return Catalog.GetString("Error. Cannot copy file.");
+ }
+ public static string FileCannotSaveStr()
+ {
+ return Catalog.GetString("Error. File cannot be saved.");
+ }
public static string ChronopicDefaultPortWindows = "COM?";
public static string ChronopicDefaultPortLinux = "/dev/ttyUSB?";
@@ -662,11 +884,22 @@ public class Constants
WARNING, INFO, HELP, INSPECT
}
- public static string No = Catalog.GetString("No");
- public static string Yes = Catalog.GetString("Yes");
-
- public static string In = Catalog.GetString("In");
- public static string Out = Catalog.GetString("Out");
+ public static string NoStr()
+ {
+ return Catalog.GetString("No");
+ }
+ public static string YesStr()
+ {
+ return Catalog.GetString("Yes");
+ }
+ public static string InStr()
+ {
+ return Catalog.GetString("In");
+ }
+ public static string OutStr()
+ {
+ return Catalog.GetString("Out");
+ }
//it's important they are two chars long
//public static string EqualThanCode = "= ";
@@ -682,36 +915,40 @@ public class Constants
}
- public static string HelpPower =
- Catalog.GetString("On jumps results tab, power is calculated depending on jump type:") +
- "\n\n" +
- //Catalog.GetString("Jumps with TC & TF: Bosco Relative Power (W/Kg)") +
- //"\n" +
- //Catalog.GetString("P = 24.6 * (Total time + Flight time) / Contact time") +
- Catalog.GetString("Jumps with TC and TF:") + " " + Catalog.GetString("Developed by Chronojump
team") +
- "\n" +
- Catalog.GetString("Calculate the potential energies on fall and after the jump.") + "\n" +
- Catalog.GetString("Divide them by time during force is applied.") +
- "\n\n" +
- //P = mass * g * ( fallHeight + 1.226 * Math.Pow(tf,2) ) / (Double)tt;
- "P = " + Catalog.GetString("mass") + " * g * ( " +
- Catalog.GetString("falling height") + " + 1.226 * " + Catalog.GetString("flight time") + " ^
2 ) / " +
- Catalog.GetString("contact time") +
- "\n\n" +
- Catalog.GetString("Jumps without TC: Lewis Peak Power 1974 (W)") +
- "\n\n" +
- Catalog.GetString("P = SQRT(4.9) * 9.8 * (body weight+extra weight) * SQRT(jump height in
meters)") +
- "\n\n" +
- Catalog.GetString("If you want to use other formulas, go to Analyze.");
-
- public static string HelpStiffness =
- "M: " + Catalog.GetString("Mass") + "\n" +
- "Tc: " + Catalog.GetString("Contact Time") + "\n" +
- "Tf: " + Catalog.GetString("Flight Time") + "\n\n" +
- Catalog.GetString("See:") + "\n" +
- "Dalleau, G; Belli, A; Viale, F; Lacour, JR; and Bourdin, M. (2004). " +
- "A simple method for field measurements of leg stiffness in hopping. " +
- "Int J Sports Med 25: 170–176";
+ public static string HelpPowerStr()
+ {
+ return Catalog.GetString("On jumps results tab, power is calculated depending on jump type:")
+
+ "\n\n" +
+ //Catalog.GetString("Jumps with TC & TF: Bosco Relative Power (W/Kg)") +
+ //"\n" +
+ //Catalog.GetString("P = 24.6 * (Total time + Flight time) / Contact time") +
+ Catalog.GetString("Jumps with TC and TF:") + " " + Catalog.GetString("Developed by
Chronojump team") +
+ "\n" +
+ Catalog.GetString("Calculate the potential energies on fall and after the jump.") +
"\n" +
+ Catalog.GetString("Divide them by time during force is applied.") +
+ "\n\n" +
+ //P = mass * g * ( fallHeight + 1.226 * Math.Pow(tf,2) ) / (Double)tt;
+ "P = " + Catalog.GetString("mass") + " * g * ( " +
+ Catalog.GetString("falling height") + " + 1.226 * " + Catalog.GetString("flight
time") + " ^ 2 ) / " +
+ Catalog.GetString("contact time") +
+ "\n\n" +
+ Catalog.GetString("Jumps without TC: Lewis Peak Power 1974 (W)") +
+ "\n\n" +
+ Catalog.GetString("P = SQRT(4.9) * 9.8 * (body weight+extra weight) * SQRT(jump
height in meters)") +
+ "\n\n" +
+ Catalog.GetString("If you want to use other formulas, go to Analyze.");
+ }
+
+ public static string HelpStiffnessStr()
+ {
+ return "M: " + Catalog.GetString("Mass") + "\n" +
+ "Tc: " + Catalog.GetString("Contact Time") + "\n" +
+ "Tf: " + Catalog.GetString("Flight Time") + "\n\n" +
+ Catalog.GetString("See:") + "\n" +
+ "Dalleau, G; Belli, A; Viale, F; Lacour, JR; and Bourdin, M. (2004). " +
+ "A simple method for field measurements of leg stiffness in hopping. " +
+ "Int J Sports Med 25: 170–176";
+ }
public const string PrefVersionAvailable = "versionAvailable";
@@ -739,12 +976,24 @@ public class Constants
public static string PhotoSmallTemp = "chronojump-last-photo-small";
public static string VideoTemp = "chronojump-last-video";
- public static string RunStartInitialSpeedYes = Catalog.GetString("Running start. Started with initial
speed.");
- public static string RunStartInitialSpeedNo = Catalog.GetString("Standing start. Started without
initial speed.");
-
- public static string CameraNotFound = Catalog.GetString("Sorry, no cameras found.");
- public static string FfmpegNotInstalled = "Software ffmpeg is not installed, please check
instructions on chronojump website (software page)";
-
+ public static string RunStartInitialSpeedYesStr()
+ {
+ return Catalog.GetString("Running start. Started with initial speed.");
+ }
+ public static string RunStartInitialSpeedNoStr()
+ {
+ return Catalog.GetString("Standing start. Started without initial speed.");
+ }
+
+ public static string CameraNotFoundStr()
+ {
+ return Catalog.GetString("Sorry, no cameras found.");
+ }
+ public static string FfmpegNotInstalledStr()
+ {
+ return "Software ffmpeg is not installed, please check instructions on chronojump website
(software page)";
+ }
+
public enum BellModes {
JUMPS, RUNS, ENCODERGRAVITATORY, ENCODERINERTIAL
}
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index 0b93e0d0..3962ad0f 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -458,7 +458,7 @@ public class JumpExecute : EventExecute
}
*/
if(simulated)
- feedbackMessage = Catalog.GetString(Constants.SimulatedMessage);
+ feedbackMessage = Catalog.GetString(Constants.SimulatedMessage());
else
feedbackMessage = "";
needShowFeedbackMessage = true;
@@ -1061,7 +1061,7 @@ public class JumpRjExecute : JumpExecute
" " + Catalog.GetString("AVG TC") + ": " + Util.TrimDecimals( Util.GetAverage
(tcString).ToString(), pDN ) ;
*/
if(simulated)
- feedbackMessage = Catalog.GetString(Constants.SimulatedMessage);
+ feedbackMessage = Catalog.GetString(Constants.SimulatedMessage());
else
feedbackMessage = "";
needShowFeedbackMessage = true;
diff --git a/src/execute/pulse.cs b/src/execute/pulse.cs
index 489bb4be..1d368491 100644
--- a/src/execute/pulse.cs
+++ b/src/execute/pulse.cs
@@ -347,7 +347,7 @@ public class PulseExecute : EventExecute
//string myStringPush = Catalog.GetString("Last pulse") + ": " + personName + " " + type ;
if(simulated)
- feedbackMessage = Catalog.GetString(Constants.SimulatedMessage);
+ feedbackMessage = Catalog.GetString(Constants.SimulatedMessage());
else
feedbackMessage = "";
needShowFeedbackMessage = true;
diff --git a/src/execute/reactionTime.cs b/src/execute/reactionTime.cs
index 2bed20a8..fb921005 100644
--- a/src/execute/reactionTime.cs
+++ b/src/execute/reactionTime.cs
@@ -278,7 +278,7 @@ public class ReactionTimeExecute : EventExecute
*/
if(simulated)
- feedbackMessage = Catalog.GetString(Constants.SimulatedMessage);
+ feedbackMessage = Constants.SimulatedMessage();
else
feedbackMessage = "";
needShowFeedbackMessage = true;
diff --git a/src/execute/run.cs b/src/execute/run.cs
index 2893a8ec..a80d44f0 100644
--- a/src/execute/run.cs
+++ b/src/execute/run.cs
@@ -671,7 +671,7 @@ public class RunExecute : EventExecute
" " + Catalog.GetString("speed") + ": " + Util.TrimDecimals (
(distance/time).ToString(), pDN );
*/
if(simulated)
- feedbackMessage = Catalog.GetString(Constants.SimulatedMessage);
+ feedbackMessage = Catalog.GetString(Constants.SimulatedMessage());
else
feedbackMessage = "";
needShowFeedbackMessage = true;
@@ -1194,7 +1194,7 @@ public class RunIntervalExecute : RunExecute
, pDN ) ;
*/
if(simulated)
- feedbackMessage = Catalog.GetString(Constants.SimulatedMessage);
+ feedbackMessage = Catalog.GetString(Constants.SimulatedMessage());
else
feedbackMessage = "";
needShowFeedbackMessage = true;
diff --git a/src/gui/about.cs b/src/gui/about.cs
index 8fbc0118..89be5984 100644
--- a/src/gui/about.cs
+++ b/src/gui/about.cs
@@ -68,17 +68,17 @@ public class About
dialog_about.ModifyBg(StateType.Normal, new Gdk.Color(0xff,0xff,0xff));
//put authors
- textLabel(Constants.AuthorsCEO, dialog_about_label_developers_CEO);
- textLabel(Constants.AuthorsSoftware, dialog_about_label_developers_software);
- textLabel(Constants.AuthorsChronopic, dialog_about_label_developers_chronopic);
- textLabel(Constants.AuthorsDevices, dialog_about_label_developers_devices);
- textLabel(Constants.AuthorsMath, dialog_about_label_developers_math);
- textLabel(Constants.AuthorsOpenCV, dialog_about_label_developers_opencv);
+ textLabel(Constants.Authors(Constants.AuthorsEnum.CEO), dialog_about_label_developers_CEO);
+ textLabel(Constants.Authors(Constants.AuthorsEnum.SOFTWARE),
dialog_about_label_developers_software);
+ textLabel(Constants.Authors(Constants.AuthorsEnum.CHRONOPIC),
dialog_about_label_developers_chronopic);
+ textLabel(Constants.Authors(Constants.AuthorsEnum.DEVICES),
dialog_about_label_developers_devices);
+ textLabel(Constants.Authors(Constants.AuthorsEnum.MATH), dialog_about_label_developers_math);
+ textLabel(Constants.Authors(Constants.AuthorsEnum.OPENCV),
dialog_about_label_developers_opencv);
//put documenters separated by commas
string docsString = "";
string paragraph = "";
- foreach (string doc in Constants.Documenters) {
+ foreach (string doc in Constants.Authors(Constants.AuthorsEnum.DOCUMENTERS)) {
docsString += paragraph;
docsString += doc;
paragraph = "\n";
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 38a871b5..bafed3b5 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -1179,11 +1179,11 @@ public partial class ChronoJumpWindow
if(fill)
{
- fillTreeView_jumps(Constants.AllJumpsName, true);
- fillTreeView_jumps_rj(Constants.AllJumpsName, true);
- fillTreeView_runs(Constants.AllRunsName, true);
- fillTreeView_runs_interval(Constants.AllRunsName, true);
- fillTreeView_pulses(Constants.AllPulsesName, true);
+ fillTreeView_jumps(Constants.AllJumpsNameStr(), true);
+ fillTreeView_jumps_rj(Constants.AllJumpsNameStr(), true);
+ fillTreeView_runs(Constants.AllRunsNameStr(), true);
+ fillTreeView_runs_interval(Constants.AllRunsNameStr(), true);
+ fillTreeView_pulses(Constants.AllPulsesNameStr(), true);
fillTreeView_reaction_times("reactionTime", true);
fillTreeView_multi_chronopic(true);
}
@@ -1959,7 +1959,7 @@ public partial class ChronoJumpWindow
private void createComboResultJumps() {
combo_result_jumps = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_result_jumps,
- SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName, "", true),
//with alljumpsname, without filter, only select name
+ SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsNameStr(), "", true),
//with alljumpsname, without filter, only select name
"");
combo_result_jumps.Active = 0;
@@ -1972,7 +1972,7 @@ public partial class ChronoJumpWindow
private void createComboResultJumpsRj() {
combo_result_jumps_rj = ComboBox.NewText();
- UtilGtk.ComboUpdate(combo_result_jumps_rj,
SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true), ""); //only select name
+ UtilGtk.ComboUpdate(combo_result_jumps_rj,
SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsNameStr(), true), ""); //only select name
combo_result_jumps_rj.Active = 0;
combo_result_jumps_rj.Changed += new EventHandler (on_combo_result_jumps_rj_changed);
@@ -1984,7 +1984,7 @@ public partial class ChronoJumpWindow
private void createComboResultRuns() {
combo_result_runs = ComboBox.NewText();
- UtilGtk.ComboUpdate(combo_result_runs, SqliteRunType.SelectRunTypes(Constants.AllRunsName,
true), ""); //without filter, only select name
+ UtilGtk.ComboUpdate(combo_result_runs,
SqliteRunType.SelectRunTypes(Constants.AllRunsNameStr(), true), ""); //without filter, only select name
combo_result_runs.Active = 0;
combo_result_runs.Changed += new EventHandler (on_combo_result_runs_changed);
@@ -1996,7 +1996,7 @@ public partial class ChronoJumpWindow
private void createComboResultRunsInterval() {
combo_result_runs_interval = ComboBox.NewText();
- UtilGtk.ComboUpdate(combo_result_runs_interval,
SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsName, true), ""); //without filter, only select
name
+ UtilGtk.ComboUpdate(combo_result_runs_interval,
SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsNameStr(), true), ""); //without filter, only
select name
combo_result_runs_interval.Active = 0;
combo_result_runs_interval.Changed += new EventHandler
(on_combo_result_runs_interval_changed);
@@ -2010,7 +2010,7 @@ public partial class ChronoJumpWindow
private void createComboPulses() {
combo_pulses = ComboBox.NewText();
- UtilGtk.ComboUpdate(combo_pulses, SqlitePulseType.SelectPulseTypes(Constants.AllPulsesName,
true), ""); //without filter, only select name
+ UtilGtk.ComboUpdate(combo_pulses,
SqlitePulseType.SelectPulseTypes(Constants.AllPulsesNameStr(), true), ""); //without filter, only select name
combo_pulses.Active = 0;
combo_pulses.Changed += new EventHandler (on_combo_pulses_changed);
@@ -2404,7 +2404,7 @@ public partial class ChronoJumpWindow
LogB.Information("edit session");
if(currentSession.Name == Constants.SessionSimulatedName)
- new DialogMessage(Constants.MessageTypes.INFO, Constants.SessionProtected);
+ new DialogMessage(Constants.MessageTypes.INFO, Constants.SessionProtectedStr());
else {
sessionAddEditWin = SessionAddEditWindow.Show(app1, currentSession);
sessionAddEditWin.FakeButtonAccept.Clicked -= new
EventHandler(on_edit_session_accepted);
@@ -2484,28 +2484,28 @@ public partial class ChronoJumpWindow
//1) simple jump
createComboSelectJumps(false);
UtilGtk.ComboUpdate(combo_result_jumps,
- SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName, "",
true), ""); //without filter, only select name
+ SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsNameStr(),
"", true), ""); //without filter, only select name
combo_select_jumps.Active = 0;
combo_result_jumps.Active = 0;
//2) reactive jump
createComboSelectJumpsRj(false);
UtilGtk.ComboUpdate(combo_result_jumps_rj,
- SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true), "");
//without filter, only select name
+ SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsNameStr(), true),
""); //without filter, only select name
combo_select_jumps_rj.Active = 0;
combo_result_jumps_rj.Active = 0;
//3) simple run
createComboSelectRuns(false);
UtilGtk.ComboUpdate(combo_result_runs,
- SqliteRunType.SelectRunTypes(Constants.AllRunsName, true), "");
//without filter, only select name
+ SqliteRunType.SelectRunTypes(Constants.AllRunsNameStr(), true), "");
//without filter, only select name
combo_select_runs.Active = 0;
combo_result_runs.Active = 0;
//4) intervallic run
createComboSelectRunsInterval(false);
UtilGtk.ComboUpdate(combo_result_runs_interval,
- SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsName,
true), ""); //without filter, only select name
+
SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsNameStr(), true), ""); //without filter, only
select name
combo_select_runs_interval.Active = 0;
combo_result_runs_interval.Active = 0;
@@ -2587,7 +2587,7 @@ public partial class ChronoJumpWindow
LogB.Information("--- delete session ---");
if(currentSession.Name == Constants.SessionSimulatedName)
- new DialogMessage(Constants.MessageTypes.INFO, Constants.SessionProtected);
+ new DialogMessage(Constants.MessageTypes.INFO, Constants.SessionProtectedStr());
else {
ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you
want to delete the current session"), "", Catalog.GetString("and all the session tests?"));
confirmWin.Button_accept.Clicked += new EventHandler(on_delete_session_accepted);
@@ -6280,7 +6280,7 @@ LogB.Debug("mc finished 5");
createComboSelectJumps(false);
UtilGtk.ComboUpdate(combo_result_jumps,
- SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName, "",
true), ""); //without filter, only select name
+ SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsNameStr(),
"", true), ""); //without filter, only select name
combo_select_jumps.Active = UtilGtk.ComboMakeActive(combo_select_jumps,
jumpTypeAddWin.Name);
combo_result_jumps.Active = UtilGtk.ComboMakeActive(combo_result_jumps,
jumpTypeAddWin.Name);
@@ -6290,7 +6290,7 @@ LogB.Debug("mc finished 5");
createComboSelectJumpsRj(false);
UtilGtk.ComboUpdate(combo_result_jumps_rj,
- SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true), "");
//without filter, only select name
+ SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsNameStr(), true),
""); //without filter, only select name
combo_select_jumps_rj.Active = UtilGtk.ComboMakeActive(combo_select_jumps_rj,
jumpTypeAddWin.Name);
combo_result_jumps_rj.Active = UtilGtk.ComboMakeActive(combo_result_jumps_rj,
jumpTypeAddWin.Name);
@@ -6320,7 +6320,7 @@ LogB.Debug("mc finished 5");
createComboSelectRuns(false);
UtilGtk.ComboUpdate(combo_result_runs,
- SqliteRunType.SelectRunTypes(Constants.AllRunsName, true), "");
//without filter, only select name
+ SqliteRunType.SelectRunTypes(Constants.AllRunsNameStr(), true), "");
//without filter, only select name
combo_select_runs.Active = UtilGtk.ComboMakeActive(combo_select_runs,
runTypeAddWin.Name);
combo_result_runs.Active = UtilGtk.ComboMakeActive(combo_result_runs,
runTypeAddWin.Name);
@@ -6330,7 +6330,7 @@ LogB.Debug("mc finished 5");
createComboSelectRunsInterval(false);
UtilGtk.ComboUpdate(combo_result_runs_interval,
- SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsName,
true), ""); //without filter, only select name
+
SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsNameStr(), true), ""); //without filter, only
select name
combo_select_runs_interval.Active =
UtilGtk.ComboMakeActive(combo_select_runs_interval, runTypeAddWin.Name);
combo_result_runs_interval.Active =
UtilGtk.ComboMakeActive(combo_result_runs_interval, runTypeAddWin.Name);
@@ -6514,10 +6514,10 @@ LogB.Debug("mc finished 5");
private void on_button_jumps_jumpsRj_result_help_power_clicked (object o, EventArgs args) {
- new DialogMessage(Constants.MessageTypes.INFO, Constants.HelpPower);
+ new DialogMessage(Constants.MessageTypes.INFO, Constants.HelpPowerStr());
}
private void on_button_jumps_jumpsRj_result_help_stiffness_clicked (object o, EventArgs args) {
- new DialogMessage(Constants.MessageTypes.INFO, Constants.HelpStiffness,
"hbox_stiffness_formula");
+ new DialogMessage(Constants.MessageTypes.INFO, Constants.HelpStiffnessStr(),
"hbox_stiffness_formula");
}
diff --git a/src/gui/dialogMessage.cs b/src/gui/dialogMessage.cs
index 770d1307..ce1e2a32 100644
--- a/src/gui/dialogMessage.cs
+++ b/src/gui/dialogMessage.cs
@@ -130,7 +130,7 @@ public class DialogMessage
try {
System.Diagnostics.Process.Start(button_go_link);
} catch {
- label_message.Text = Constants.WebsiteNotFound;
+ label_message.Text = Constants.WebsiteNotFoundStr();
}
}
diff --git a/src/gui/dialogPersonPopup.cs b/src/gui/dialogPersonPopup.cs
index 2fe58988..95c96cc6 100644
--- a/src/gui/dialogPersonPopup.cs
+++ b/src/gui/dialogPersonPopup.cs
@@ -95,7 +95,7 @@ public class DialogPersonPopup
image_server_connected_yes.Visible = true;
image_server_connected_no.Visible = false;
} else {
- label_server_connected.Text = Constants.ServerDisconnectedMessage;
+ label_server_connected.Text = Constants.ServerDisconnectedMessage();
image_server_connected_yes.Visible = false;
image_server_connected_no.Visible = true;
}
diff --git a/src/gui/evaluator.cs b/src/gui/evaluator.cs
index 8188492d..b3d1ba4e 100644
--- a/src/gui/evaluator.cs
+++ b/src/gui/evaluator.cs
@@ -167,10 +167,10 @@ public class EvaluatorWindow
private void createComboContinents() {
combo_continents = ComboBox.NewText ();
- continents = Constants.Continents;
+ continents = Constants.ContinentsStr();
//create continentsTranslated, only with translated stuff
- continentsTranslated = new String[Constants.Continents.Length];
+ continentsTranslated = new String[Constants.ContinentsStr().Length];
int i = 0;
foreach(string continent in continents)
continentsTranslated[i++] = Util.FetchName(continent);
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index d1122148..40b618f9 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -1248,7 +1248,7 @@ LogB.Information(" re R ");
{
if(! Util.FileExists(lastForceSensorFullPath))
{
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileNotFound);
+ new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileNotFoundStr());
return;
}
@@ -1654,7 +1654,7 @@ LogB.Information(" re R ");
if(dataDir != "")
System.Diagnostics.Process.Start(dataDir);
else
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.DirectoryCannotOpen);
+ new DialogMessage(Constants.MessageTypes.WARNING, Constants.DirectoryCannotOpenStr());
}
private void on_button_force_sensor_adjust_clicked (object o, EventArgs args)
diff --git a/src/gui/forceSensorAnalyze.cs b/src/gui/forceSensorAnalyze.cs
index 7be5790d..86dc68ae 100644
--- a/src/gui/forceSensorAnalyze.cs
+++ b/src/gui/forceSensorAnalyze.cs
@@ -1311,7 +1311,7 @@ public partial class ChronoJumpWindow
if (canDoForceSensorAnalyzeAB())
checkFile(Constants.CheckFileOp.FORCESENSOR_ANALYZE_SAVE_AB);
else {
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileNotFound);
+ new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileNotFoundStr());
return;
}
}
diff --git a/src/gui/helpPorts.cs b/src/gui/helpPorts.cs
index f9c0f79e..7a3d64ba 100644
--- a/src/gui/helpPorts.cs
+++ b/src/gui/helpPorts.cs
@@ -49,7 +49,7 @@ public class HelpPorts
if(UtilAll.IsWindows()) {
- messageInfo = Constants.PortNamesWindows;
+ messageInfo = Constants.PortNamesWindowsStr();
/*
* autodetection disabled on Linux and windows because mono doesn't allow it
@@ -62,7 +62,7 @@ public class HelpPorts
messageDetected = string.Format(Catalog.GetString("Auto-Detection currently
disabled"));
} else {
- messageInfo = Constants.PortNamesLinux;
+ messageInfo = Constants.PortNamesLinuxStr();
messageDetected = UtilAll.DetectPortsLinux(true); //formatting
button_check_port.Hide();
button_force_port.Hide();
@@ -75,12 +75,12 @@ public class HelpPorts
if(UtilAll.IsWindows()) {
label_help_info.Text =
- Constants.FindDriverWindows + "\n\n" +
+ Constants.FindDriverWindowsStr() + "\n\n" +
Catalog.GetString("Ports above COM4 may not work.") + "\n" +
Catalog.GetString("If you want a safer port, press:") + "\n" +
Catalog.GetString("Force Chronopic to port <b>COM1 - COM4</b>'.");
} else
- label_help_info.Text = Constants.FindDriverOthers;
+ label_help_info.Text = Constants.FindDriverOthersStr();
label_help_info.UseMarkup = true;
diff --git a/src/gui/jumpType.cs b/src/gui/jumpType.cs
index 669b96c0..7989b04c 100644
--- a/src/gui/jumpType.cs
+++ b/src/gui/jumpType.cs
@@ -145,7 +145,7 @@ public class JumpTypeAddWindow
//check if this jump type exists, and check it's name is not AllJumpsName
bool jumpTypeExists = Sqlite.Exists (false, Constants.JumpTypeTable, name);
- if(name == Constants.AllJumpsName)
+ if(name == Constants.AllJumpsNameStr())
jumpTypeExists = true;
if(jumpTypeExists) {
diff --git a/src/gui/jumpsProfile.cs b/src/gui/jumpsProfile.cs
index c1351a32..b4e68bc1 100644
--- a/src/gui/jumpsProfile.cs
+++ b/src/gui/jumpsProfile.cs
@@ -77,7 +77,7 @@ public static class JumpsProfileGraph
{
g.SetSourceRGB(0,0,0);
g.SetFontSize(16);
- printText(100, 100, 24, textHeight, Constants.JumpsProfileNeededJumps, g, false);
+ printText(100, 100, 24, textHeight, Constants.JumpsProfileNeededJumpsStr(), g, false);
g.GetTarget().Dispose ();
g.Dispose ();
return;
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index eab6c3f2..c3aa6235 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -513,7 +513,7 @@ public partial class ChronoJumpWindow
{
if(shouldShowRFIDDisconnected)
{
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.RFIDDisconnectedMessage);
+ new DialogMessage(Constants.MessageTypes.WARNING,
Constants.RFIDDisconnectedMessage());
if(dialogPersonPopup != null)
dialogPersonPopup.DestroyDialog();
@@ -624,7 +624,7 @@ public partial class ChronoJumpWindow
{
dialogMessageNotAtServer = new DialogMessage(
Constants.MessageTypes.WARNING,
- Constants.ServerDisconnectedMessage
+ Constants.ServerDisconnectedMessage()
); //GTK
compujumpPersonLogoutDo();
@@ -634,7 +634,7 @@ public partial class ChronoJumpWindow
LogB.Information("Person NOT found on server!");
if(dialogMessageNotAtServer == null || ! dialogMessageNotAtServer.Visible)
{
- dialogMessageNotAtServer = new
DialogMessage(Constants.MessageTypes.WARNING, Constants.RFIDNotInServerMessage); //GTK
+ dialogMessageNotAtServer = new
DialogMessage(Constants.MessageTypes.WARNING, Constants.RFIDNotInServerMessage()); //GTK
compujumpPersonLogoutDo();
}
diff --git a/src/gui/person.cs b/src/gui/person.cs
index d0b190c2..01fbc293 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -1298,7 +1298,7 @@ public class PersonAddModifyWindow
private void createComboLevels() {
combo_levels = ComboBox.NewText ();
- levels = Constants.Levels;
+ levels = Constants.LevelsStr();
UtilGtk.ComboUpdate(combo_levels, levels, "");
combo_levels.Active = UtilGtk.ComboMakeActive(levels,
@@ -1314,10 +1314,10 @@ public class PersonAddModifyWindow
private void createComboContinents() {
combo_continents = ComboBox.NewText ();
- continents = Constants.Continents;
+ continents = Constants.ContinentsStr();
//create continentsTranslated, only with translated stuff
- continentsTranslated = new String[Constants.Continents.Length];
+ continentsTranslated = new String[Constants.ContinentsStr().Length];
int i = 0;
foreach(string continent in continents)
continentsTranslated[i++] = Util.FetchName(continent);
@@ -2175,7 +2175,7 @@ public class PersonAddMultipleWindow {
} catch {
LogB.Warning("Catched, maybe is used by another program");
new DialogMessage(Constants.MessageTypes.WARNING,
- Constants.FileCannotSave + "\n\n" +
+ Constants.FileCannotSaveStr() + "\n\n" +
Catalog.GetString("Maybe this file is opened by an
SpreadSheet software like Excel. Please, close that program.")
);
fc.Destroy();
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index e66c0738..669cfe42 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -1196,7 +1196,7 @@ public class PreferencesWindow
else if(file2.Exists)
System.Diagnostics.Process.Start(Util.GetDatabaseTempDir());
else
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.DatabaseNotFound);
+ new DialogMessage(Constants.MessageTypes.WARNING, Constants.DatabaseNotFoundStr());
}
void on_button_db_restore_clicked (object o, EventArgs args)
@@ -1241,7 +1241,7 @@ public class PreferencesWindow
}
catch {
new DialogMessage(Constants.MessageTypes.WARNING,
- Constants.DirectoryCannotOpen + "\n\n" + dir);
+ Constants.DirectoryCannotOpenStr() + "\n\n" + dir);
}
}
@@ -1255,7 +1255,7 @@ public class PreferencesWindow
System.Diagnostics.Process.Start(dir);
} catch {
new DialogMessage(Constants.MessageTypes.WARNING,
- Constants.DirectoryCannotOpen + "\n\n" + dir);
+ Constants.DirectoryCannotOpenStr() + "\n\n" + dir);
}
LogB.Warning(dir);
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 3615a282..7ea3b1dd 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -109,9 +109,9 @@ public class EditRunWindow : EditEventWindow
protected override void fillRunStart(Event myEvent) {
Run myRun = (Run) myEvent;
if(myRun.InitialSpeed)
- label_run_start_value.Text = Constants.RunStartInitialSpeedYes;
+ label_run_start_value.Text = Constants.RunStartInitialSpeedYesStr();
else
- label_run_start_value.Text = Constants.RunStartInitialSpeedNo;
+ label_run_start_value.Text = Constants.RunStartInitialSpeedNoStr();
}
protected override void fillDistance(Event myEvent) {
@@ -493,9 +493,9 @@ public class EditRunIntervalWindow : EditRunWindow
protected override void fillRunStart(Event myEvent) {
RunInterval myRun = (RunInterval) myEvent;
if(myRun.InitialSpeed)
- label_run_start_value.Text = Constants.RunStartInitialSpeedYes;
+ label_run_start_value.Text = Constants.RunStartInitialSpeedYesStr();
else
- label_run_start_value.Text = Constants.RunStartInitialSpeedNo;
+ label_run_start_value.Text = Constants.RunStartInitialSpeedNoStr();
}
diff --git a/src/gui/runEncoder.cs b/src/gui/runEncoder.cs
index 979990b8..0f2019eb 100644
--- a/src/gui/runEncoder.cs
+++ b/src/gui/runEncoder.cs
@@ -649,7 +649,7 @@ LogB.Information(" fc R ");
if(dataDir != "")
System.Diagnostics.Process.Start(dataDir);
else
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.DirectoryCannotOpen);
+ new DialogMessage(Constants.MessageTypes.WARNING, Constants.DirectoryCannotOpenStr());
}
}
diff --git a/src/gui/runType.cs b/src/gui/runType.cs
index 1c43a0a5..3f35e29f 100644
--- a/src/gui/runType.cs
+++ b/src/gui/runType.cs
@@ -185,7 +185,7 @@ public class RunTypeAddWindow
//check if this run type exists, and check it's name is not AllRunsName
bool runTypeExists = Sqlite.Exists (false, Constants.RunTypeTable, name);
- if(name == Constants.AllRunsName)
+ if(name == Constants.AllRunsNameStr())
runTypeExists = true;
if(runTypeExists) {
diff --git a/src/gui/session.cs b/src/gui/session.cs
index e6871ded..27f83f0d 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -358,7 +358,7 @@ public class SessionAddEditWindow {
private void createComboLevels() {
combo_levels = ComboBox.NewText ();
- levels = Constants.Levels;
+ levels = Constants.LevelsStr();
UtilGtk.ComboUpdate(combo_levels, levels, "");
combo_levels.Active = UtilGtk.ComboMakeActive(levels,
diff --git a/src/gui/splash.cs b/src/gui/splash.cs
index 18492621..e225ae76 100644
--- a/src/gui/splash.cs
+++ b/src/gui/splash.cs
@@ -132,7 +132,7 @@ public class SplashWindow
else if(file2.Exists)
System.Diagnostics.Process.Start(Util.GetDatabaseTempDir());
else
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.DatabaseNotFound);
+ new DialogMessage(Constants.MessageTypes.WARNING, Constants.DatabaseNotFoundStr());
}
public void Show_button_open_docs_folder () {
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index 368afcaf..914967ac 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -126,11 +126,11 @@ public partial class ChronoJumpWindow {
private static string [] comboStatsTypeOptions = {
// Constants.TypeSessionSummary, //deactivated until R is fully implemented
// Constants.TypeJumperSummary,
- Constants.TypeJumpsSimple,
- Constants.TypeJumpsSimpleWithTC,
- Constants.TypeJumpsReactive,
- Constants.TypeRunsSimple,
- Constants.TypeRunsIntervallic,
+ Constants.TypeJumpsSimpleStr(),
+ Constants.TypeJumpsSimpleWithTCStr(),
+ Constants.TypeJumpsReactiveStr(),
+ Constants.TypeRunsSimpleStr(),
+ Constants.TypeRunsIntervallicStr(),
};
private void stats_win_change_test_type(int testPage) {
@@ -185,25 +185,25 @@ public partial class ChronoJumpWindow {
private static string [] comboStatsSubTypeSimpleOptions = {
Catalog.GetString("No indexes"),
- //Constants.ChronojumpProfile,
+ //Constants.ChronojumpProfileStr(),
Constants.FvIndexFormula,
Constants.IeIndexFormula,
Constants.ArmsUseIndexFormula,
Constants.IRnaIndexFormula,
Constants.IRaIndexFormula,
Catalog.GetString(Constants.SubtractionBetweenTests),
- Constants.PotencyLewisFormulaShort,
- Constants.PotencyHarmanFormulaShort,
- Constants.PotencySayersSJFormulaShort,
- Constants.PotencySayersCMJFormulaShort,
- Constants.PotencyShettyFormulaShort,
- Constants.PotencyCanavanFormulaShort,
+ Constants.PotencyLewisFormulaShortStr(),
+ Constants.PotencyHarmanFormulaShortStr(),
+ Constants.PotencySayersSJFormulaShortStr(),
+ Constants.PotencySayersCMJFormulaShortStr(),
+ Constants.PotencyShettyFormulaShortStr(),
+ Constants.PotencyCanavanFormulaShortStr(),
//Constants.PotencyBahamondeFormulaShort,
- Constants.PotencyLaraMaleApplicantsSCFormulaShort,
- Constants.PotencyLaraFemaleEliteVoleiFormulaShort,
- Constants.PotencyLaraFemaleMediumVoleiFormulaShort,
- Constants.PotencyLaraFemaleSCStudentsFormulaShort,
- Constants.PotencyLaraFemaleSedentaryFormulaShort
+ Constants.PotencyLaraMaleApplicantsSCFormulaShortStr(),
+ Constants.PotencyLaraFemaleEliteVoleiFormulaShortStr(),
+ Constants.PotencyLaraFemaleMediumVoleiFormulaShortStr(),
+ Constants.PotencyLaraFemaleSCStudentsFormulaShortStr(),
+ Constants.PotencyLaraFemaleSedentaryFormulaShortStr()
};
@@ -489,7 +489,7 @@ public partial class ChronoJumpWindow {
UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeStripchart ||
UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeHistogram ||
UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeDotchart) {
- combo_graph_palette.Active = UtilGtk.ComboMakeActive(Constants.GraphPalettes,
Constants.GraphPaletteBlack);
+ combo_graph_palette.Active = UtilGtk.ComboMakeActive(Constants.GraphPalettes,
Constants.GraphPaletteBlackStr());
combo_graph_palette.Sensitive = false;
label_graph_legend.Visible = false;
combo_graph_legend.Visible = false;
@@ -560,7 +560,7 @@ public partial class ChronoJumpWindow {
private void updateComboStats() {
string [] nullOptions = { "-" };
- if(UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeSessionSummary )
+ if(UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeSessionSummaryStr() )
{
UtilGtk.ComboUpdate(combo_stats_stat_subtype, nullOptions, "");
combo_stats_stat_subtype.Sensitive = false;
@@ -568,7 +568,7 @@ public partial class ChronoJumpWindow {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, nullOptions, "");
combo_stats_stat_apply_to.Sensitive = false;
}
- else if(UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumperSummary )
+ else if(UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumperSummaryStr() )
{
UtilGtk.ComboUpdate(combo_stats_stat_subtype, nullOptions, "");
combo_stats_stat_subtype.Sensitive = false;
@@ -586,7 +586,7 @@ public partial class ChronoJumpWindow {
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
- else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimple )
+ else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimpleStr() )
{
combo_stats_stat_subtype.Changed -= new EventHandler
(on_combo_stats_stat_subtype_changed);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeSimpleOptions, "");
@@ -598,12 +598,12 @@ public partial class ChronoJumpWindow {
//by default show all simple nonTC jumps, but if combo_stats_subtype changed
//updateComboStatsSubType() will do the work
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName,
"nonTC", true), ""); //only select name
+ SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsNameStr(),
"nonTC", true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
- else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimpleWithTC )
+ else if (UtilGtk.ComboGetActive(combo_stats_stat_type) ==
Constants.TypeJumpsSimpleWithTCStr() )
{
combo_stats_stat_subtype.Changed -= new EventHandler
(on_combo_stats_stat_subtype_changed);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeWithTCOptions, "");
@@ -613,11 +613,11 @@ public partial class ChronoJumpWindow {
combo_stats_stat_subtype.Active = 0;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName, "TC", true),
""); //only select name
+ SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsNameStr(), "TC",
true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
- else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsReactive )
+ else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsReactiveStr() )
{
combo_stats_stat_subtype.Changed -= new EventHandler
(on_combo_stats_stat_subtype_changed);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeReactiveOptions, "");
@@ -627,11 +627,11 @@ public partial class ChronoJumpWindow {
combo_stats_stat_subtype.Active = 0;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsName, true), ""); //only
select name
+ SqliteJumpType.SelectJumpRjTypes(Constants.AllJumpsNameStr(), true), "");
//only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
- else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeRunsSimple )
+ else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeRunsSimpleStr() )
{
combo_stats_stat_subtype.Changed -= new EventHandler
(on_combo_stats_stat_subtype_changed);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeSimpleOptions, "");
@@ -641,11 +641,11 @@ public partial class ChronoJumpWindow {
combo_stats_stat_subtype.Active = 0;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteRunType.SelectRunTypes(Constants.AllRunsName, true), ""); //only select
name
+ SqliteRunType.SelectRunTypes(Constants.AllRunsNameStr(), true), ""); //only
select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
- else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeRunsIntervallic )
+ else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeRunsIntervallicStr() )
{
combo_stats_stat_subtype.Changed -= new EventHandler
(on_combo_stats_stat_subtype_changed);
UtilGtk.ComboUpdate(combo_stats_stat_subtype, comboStatsSubTypeSimpleOptions, "");
@@ -655,7 +655,7 @@ public partial class ChronoJumpWindow {
combo_stats_stat_subtype.Active = 0;
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsName, true),
""); //only select name
+ SqliteRunIntervalType.SelectRunIntervalTypes(Constants.AllRunsNameStr(),
true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
@@ -669,14 +669,14 @@ public partial class ChronoJumpWindow {
label_apply_to.Visible = true;
combo_stats_stat_apply_to.Visible = true;
//subtraction_between_tests_show(false);
- if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimple )
+ if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimpleStr() )
{
if(UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Catalog.GetString("No
indexes")) {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName,
"nonTC", true), ""); //only select name
+ SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsNameStr(),
"nonTC", true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
- } else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) ==
Constants.ChronojumpProfile) {
+ } else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) ==
Constants.ChronojumpProfileStr()) {
UtilGtk.ComboUpdate(combo_stats_stat_apply_to, "SJ, SJl 100%, CMJ, ABK, DJa");
combo_stats_stat_apply_to.Active = 0;
combo_stats_stat_apply_to.Sensitive = false;
@@ -711,7 +711,7 @@ public partial class ChronoJumpWindow {
label_apply_to.Visible = false;
combo_stats_stat_apply_to.Visible = false;
combo_stats_stat_apply_to.Active = 0;
- } else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) ==
Constants.PotencySayersSJFormulaShort) {
+ } else if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) ==
Constants.PotencySayersSJFormulaShortStr()) {
combo_stats_stat_apply_to.Active =
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
SqliteJumpType.SelectJumpTypes(false, "", "nonTC",
true), //only select name
@@ -738,10 +738,10 @@ public partial class ChronoJumpWindow {
combo_stats_stat_apply_to.Sensitive = false;
}
}
- else if (UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeJumpsSimpleWithTC )
+ else if (UtilGtk.ComboGetActive(combo_stats_stat_type) ==
Constants.TypeJumpsSimpleWithTCStr() )
{
UtilGtk.ComboUpdate(combo_stats_stat_apply_to,
- SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsName, "TC", true),
""); //only select name
+ SqliteJumpType.SelectJumpTypes(false, Constants.AllJumpsNameStr(), "TC",
true), ""); //only select name
combo_stats_stat_apply_to.Sensitive = true;
combo_stats_stat_apply_to.Active = 0;
}
@@ -750,7 +750,7 @@ public partial class ChronoJumpWindow {
if is RjEvolution, or runIntervallic show mark consecutives, graph only with lines and
transposed
*/
if ( UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Catalog.GetString("Evolution") ||
- UtilGtk.ComboGetActive(combo_stats_stat_type) ==
Constants.TypeRunsIntervallic ) {
+ UtilGtk.ComboGetActive(combo_stats_stat_type) ==
Constants.TypeRunsIntervallicStr() ) {
//hbox_mark_consecutives.Show();
showMarkConsecutives = true;
checkbutton_transposed.Active = true;
@@ -866,7 +866,7 @@ public partial class ChronoJumpWindow {
int evolution_mark_consecutives = -1;
if (
( UtilGtk.ComboGetActive(combo_stats_stat_subtype) ==
Catalog.GetString("Evolution") ||
- UtilGtk.ComboGetActive(combo_stats_stat_type) ==
Constants.TypeRunsIntervallic ) &&
+ UtilGtk.ComboGetActive(combo_stats_stat_type) ==
Constants.TypeRunsIntervallicStr() ) &&
checkbutton_mark_consecutives.Active ) {
evolution_mark_consecutives = Convert.ToInt32 ( spinbutton_mark_consecutives.Value );
}
@@ -946,8 +946,8 @@ public partial class ChronoJumpWindow {
//show/hide persons selector on comboCheckboxesOptions
if(! graph) {
- if(UtilGtk.ComboGetActive(combo_stats_stat_type) != Constants.TypeSessionSummary &&
- UtilGtk.ComboGetActive(combo_stats_stat_type) !=
Constants.TypeJumperSummary)
+ if(UtilGtk.ComboGetActive(combo_stats_stat_type) != Constants.TypeSessionSummaryStr()
&&
+ UtilGtk.ComboGetActive(combo_stats_stat_type) !=
Constants.TypeJumperSummaryStr())
comboCheckboxesOptions = addPersonsToComboCheckBoxesOptions();
else
comboCheckboxesOptions = comboCheckboxesOptionsWithoutPersons;
@@ -1061,11 +1061,11 @@ public partial class ChronoJumpWindow {
return;
//some stats should not be showed as limited jumps
- if( (statisticType == Constants.TypeJumpsReactive &&
+ if( (statisticType == Constants.TypeJumpsReactiveStr() &&
( statisticSubType == Catalog.GetString("Evolution") ||
statisticSubType == Constants.RJAVGSDRjIndexName ||
statisticSubType == Constants.RJAVGSDQIndexName) )
- || statisticType == Constants.TypeRunsIntervallic )
+ || statisticType == Constants.TypeRunsIntervallicStr() )
{
//don't allow Evolution be multisession
radiobutton_current_session.Active = true;
@@ -1083,19 +1083,19 @@ public partial class ChronoJumpWindow {
radiobutton_stats_jumps_person_average.Sensitive = false;
}
//in Potency formulas show only "all jumps" radiobutton
- else if(statisticType == Constants.TypeJumpsSimple && (
- statisticSubType == Constants.PotencyLewisFormulaShort ||
- statisticSubType == Constants.PotencyHarmanFormulaShort ||
- statisticSubType == Constants.PotencySayersSJFormulaShort ||
- statisticSubType == Constants.PotencySayersCMJFormulaShort ||
- statisticSubType == Constants.PotencyShettyFormulaShort ||
- statisticSubType == Constants.PotencyCanavanFormulaShort ||
+ else if(statisticType == Constants.TypeJumpsSimpleStr() && (
+ statisticSubType == Constants.PotencyLewisFormulaShortStr() ||
+ statisticSubType == Constants.PotencyHarmanFormulaShortStr() ||
+ statisticSubType == Constants.PotencySayersSJFormulaShortStr() ||
+ statisticSubType == Constants.PotencySayersCMJFormulaShortStr() ||
+ statisticSubType == Constants.PotencyShettyFormulaShortStr() ||
+ statisticSubType == Constants.PotencyCanavanFormulaShortStr() ||
//statisticSubType == Constants.PotencyBahamondeFormulaShort ||
- statisticSubType == Constants.PotencyLaraMaleApplicantsSCFormulaShort
||
- statisticSubType == Constants.PotencyLaraFemaleEliteVoleiFormulaShort
||
- statisticSubType ==
Constants.PotencyLaraFemaleMediumVoleiFormulaShort ||
- statisticSubType == Constants.PotencyLaraFemaleSCStudentsFormulaShort
||
- statisticSubType == Constants.PotencyLaraFemaleSedentaryFormulaShort
+ statisticSubType ==
Constants.PotencyLaraMaleApplicantsSCFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencyLaraFemaleEliteVoleiFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencyLaraFemaleMediumVoleiFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencyLaraFemaleSCStudentsFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencyLaraFemaleSedentaryFormulaShortStr()
) ) {
//change the radiobutton value
if(radiobutton_stats_jumps_limit.Active ||
radiobutton_stats_jumps_person_average.Active ||
@@ -1108,7 +1108,7 @@ public partial class ChronoJumpWindow {
radiobutton_stats_jumps_person_bests.Sensitive = false;
radiobutton_stats_jumps_person_average.Sensitive = false;
}
- else if(statisticType == Constants.TypeJumpsSimple && statisticSubType ==
Constants.ChronojumpProfile) {
+ else if(statisticType == Constants.TypeJumpsSimpleStr() && statisticSubType ==
Constants.ChronojumpProfileStr()) {
//on Chronojump profile only best jumps are used
radiobutton_stats_jumps_person_bests.Active = true;
//make no sensitive
@@ -1117,9 +1117,9 @@ public partial class ChronoJumpWindow {
radiobutton_stats_jumps_limit.Sensitive = false;
radiobutton_stats_jumps_person_average.Sensitive = false;
}
- else if(statisticType == Constants.TypeSessionSummary ||
- statisticType == Constants.TypeJumperSummary ||
- ( statisticType == Constants.TypeJumpsSimple &&
+ else if(statisticType == Constants.TypeSessionSummaryStr() ||
+ statisticType == Constants.TypeJumperSummaryStr() ||
+ ( statisticType == Constants.TypeJumpsSimpleStr() &&
statisticSubType != Catalog.GetString("No indexes") ) ||
(selectedSessions.Count > 1 && ! radiobutton_current_session.Active) )
{
@@ -1208,7 +1208,7 @@ public partial class ChronoJumpWindow {
combo_graph_type, Constants.GraphTypes,
UtilGtk.ComboGetActive(combo_graph_type));
//except
if ( UtilGtk.ComboGetActive(combo_stats_stat_subtype) ==
Catalog.GetString("Evolution") ||
- UtilGtk.ComboGetActive(combo_stats_stat_type) ==
Constants.TypeRunsIntervallic ) {
+ UtilGtk.ComboGetActive(combo_stats_stat_type) ==
Constants.TypeRunsIntervallicStr() ) {
notebook_stats_win_options.Show();
checkbutton_transposed.Active = true;
checkbutton_transposed.Sensitive = false;
@@ -1298,7 +1298,7 @@ public partial class ChronoJumpWindow {
return;
} else {
if ( ( statisticSubType == Catalog.GetString("Evolution") ||
- statisticType == Constants.TypeRunsIntervallic ) &&
+ statisticType == Constants.TypeRunsIntervallicStr() ) &&
checkbutton_mark_consecutives.Active ) {
statisticSubType += "." + ( spinbutton_mark_consecutives.Value ).ToString();
}
diff --git a/src/multiChronopic.cs b/src/multiChronopic.cs
index 26006567..5c339826 100644
--- a/src/multiChronopic.cs
+++ b/src/multiChronopic.cs
@@ -299,7 +299,7 @@ public class MultiChronopic : Event
int pos=0;
double thisTime = 0;
- string thisState = Constants.Out;
+ string thisState = Constants.OutStr();
iibefore = -1;
oobefore = -1;
pos = nextCp -1;
diff --git a/src/sqlite/encoderConfiguration.cs b/src/sqlite/encoderConfiguration.cs
index 67e73985..8b4e1322 100644
--- a/src/sqlite/encoderConfiguration.cs
+++ b/src/sqlite/encoderConfiguration.cs
@@ -63,7 +63,7 @@ class SqliteEncoderConfiguration : Sqlite
if(encoderGI == Constants.EncoderGI.GRAVITATORY)
Insert(true,
new EncoderConfigurationSQLObject(
- -1 , encoderGI, true, Constants.DefaultString, new
EncoderConfiguration(), "") //LINEAR, not inertial
+ -1 , encoderGI, true, Constants.DefaultString(), new
EncoderConfiguration(), "") //LINEAR, not inertial
);
else if(encoderGI == Constants.EncoderGI.INERTIAL)
{
@@ -71,7 +71,7 @@ class SqliteEncoderConfiguration : Sqlite
ec.SetInertialDefaultOptions();
Insert(true,
new EncoderConfigurationSQLObject(
- -1 , encoderGI, true, Constants.DefaultString, ec, "")
+ -1 , encoderGI, true, Constants.DefaultString(), ec, "")
);
}
else
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 88059800..e2b51338 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -2061,7 +2061,7 @@ class Sqlite
{
SqliteEncoderConfiguration.Insert(true,
new EncoderConfigurationSQLObject(
- -1, Constants.EncoderGI.INERTIAL, true,
Constants.DefaultString, econfOnPreferences, "")
+ -1, Constants.EncoderGI.INERTIAL, true,
Constants.DefaultString(), econfOnPreferences, "")
);
SqliteEncoderConfiguration.insertDefault(Constants.EncoderGI.GRAVITATORY);
}
@@ -2069,7 +2069,7 @@ class Sqlite
{
SqliteEncoderConfiguration.Insert(true,
new EncoderConfigurationSQLObject(
- -1, Constants.EncoderGI.GRAVITATORY, true,
Constants.DefaultString, econfOnPreferences, "")
+ -1, Constants.EncoderGI.GRAVITATORY, true,
Constants.DefaultString(), econfOnPreferences, "")
);
SqliteEncoderConfiguration.insertDefault(Constants.EncoderGI.INERTIAL);
}
diff --git a/src/sqlite/stat.cs b/src/sqlite/stat.cs
index 7b965f1e..72f427d6 100644
--- a/src/sqlite/stat.cs
+++ b/src/sqlite/stat.cs
@@ -135,7 +135,7 @@ class SqliteStat : Sqlite
//manage allJumps
string fromString = " FROM jump, " + tp + ", " + tps + " ";
string jumpTypeString = " AND jump.type == \"" + jumpType + "\" ";
- if(jumpType == Constants.AllJumpsName) {
+ if(jumpType == Constants.AllJumpsNameStr()) {
moreSelect = moreSelect + ", jump.type ";
fromString = " FROM jump, " + tp + ", " + tps + ", jumpType ";
jumpTypeString = " AND jumpType.startIn == 1 AND jump.Type == jumpType.name ";
@@ -182,7 +182,7 @@ class SqliteStat : Sqlite
//manage allJumps (show jumpType beside name (and sex))
//but only if it's not an AVG of different jumps
//TODO:Catalog?
- if(jumpType == Constants.AllJumpsName && operationString != "AVG") {
+ if(jumpType == Constants.AllJumpsNameStr() && operationString != "AVG") {
showJumpTypeString = " (" + reader[6].ToString() + ")";
}
@@ -296,7 +296,7 @@ class SqliteStat : Sqlite
//manage allJumps
string fromString = " FROM jump, " + tp + sep + tps + " ";
string jumpTypeString = " AND jump.type == \"" + jumpType + "\" ";
- if(jumpType == Constants.AllJumpsName) {
+ if(jumpType == Constants.AllJumpsNameStr()) {
moreSelect = moreSelect + ", jump.type ";
fromString = " FROM jump, " + tp + sep + tps + ", jumpType ";
jumpTypeString = " AND jumpType.startIn == 0 AND jump.Type == jumpType.name ";
@@ -345,7 +345,7 @@ class SqliteStat : Sqlite
}
//manage allJumps (show jumpType beside name (and sex))
//but only if it's not an AVG of different jumps
- if(jumpType == Constants.AllJumpsName && operationString != "AVG") {
+ if(jumpType == Constants.AllJumpsNameStr() && operationString != "AVG") {
showJumpTypeString = " (" + reader[7].ToString() + ")";
}
@@ -403,7 +403,7 @@ class SqliteStat : Sqlite
//manage allJumps
string fromString = " FROM jumpRj, " + tp + " ";
string jumpTypeString = " AND jumpRj.type == \"" + jumpType + "\" ";
- if(jumpType == Constants.AllJumpsName) {
+ if(jumpType == Constants.AllJumpsNameStr()) {
moreSelect = moreSelect + ", jumpRj.type ";
fromString = " FROM jumpRj, " + tp + ", jumpRjType ";
jumpTypeString = " AND jumpRj.Type == jumpRjType.name ";
@@ -449,7 +449,7 @@ class SqliteStat : Sqlite
}
//manage allJumps (show jumpType beside name (and sex))
//but only if it's not an AVG of different jumps
- if(jumpType == Constants.AllJumpsName && operationString != "AVG") {
+ if(jumpType == Constants.AllJumpsNameStr() && operationString != "AVG") {
showJumpTypeString = " (" + reader[7].ToString() + ")";
}
@@ -500,7 +500,7 @@ class SqliteStat : Sqlite
//manage allJumps
string fromString = " FROM jumpRj, " + tp + " ";
string jumpTypeString = " AND jumpRj.type == \"" + jumpType + "\" ";
- if(jumpType == Constants.AllJumpsName) {
+ if(jumpType == Constants.AllJumpsNameStr()) {
moreSelect = moreSelect + ", jumpRj.type ";
fromString = " FROM jumpRj, " + tp + ", jumpRjType ";
jumpTypeString = " AND jumpRj.Type == jumpRjType.name ";
@@ -547,7 +547,7 @@ class SqliteStat : Sqlite
}
//manage allJumps (show jumpType beside name (and sex))
//but only if it's not an AVG of different jumps
- if(jumpType == Constants.AllJumpsName && operationString != "AVG") {
+ if(jumpType == Constants.AllJumpsNameStr() && operationString != "AVG") {
showJumpTypeString = " (" + reader[9].ToString() + ")";
}
@@ -686,7 +686,7 @@ class SqliteStat : Sqlite
//manage allJumps
string fromString = " FROM jumpRj, " + tp + " ";
string jumpTypeString = " AND jumpRj.type == \"" + jumpType + "\" ";
- if(jumpType == Constants.AllJumpsName) {
+ if(jumpType == Constants.AllJumpsNameStr()) {
moreSelect = moreSelect + ", jumpRj.type ";
fromString = " FROM jumpRj, " + tp + ", jumpRjType ";
jumpTypeString = " AND jumpRj.Type == jumpRjType.name ";
@@ -730,7 +730,7 @@ class SqliteStat : Sqlite
}
//manage allJumps (show jumpType beside name (and sex))
//but only if it's not an AVG of different jumps
- if(jumpType == Constants.AllJumpsName && operationString != "AVG") {
+ if(jumpType == Constants.AllJumpsNameStr() && operationString != "AVG") {
showJumpTypeString = " (" + reader[7].ToString() + ")";
}
@@ -793,7 +793,7 @@ class SqliteStat : Sqlite
string fromString = " FROM " + Constants.RunIntervalTable + ", " +
tp + ", " + Constants.RunIntervalTypeTable + " ";
string runTypeString = " AND " + Constants.RunIntervalTable + ".type == \"" + runType + "\" ";
- if(runType == Constants.AllRunsName) {
+ if(runType == Constants.AllRunsNameStr()) {
moreSelect = moreSelect + ", " + Constants.RunIntervalTable + ".type ";
runTypeString = "";
}
@@ -837,7 +837,7 @@ class SqliteStat : Sqlite
}
//manage allRuns (show runType beside name (and sex))
//but only if it's not an AVG of different jumps
- if(runType == Constants.AllRunsName && operationString != "AVG") {
+ if(runType == Constants.AllRunsNameStr() && operationString != "AVG") {
showRunTypeString = " (" + reader[7].ToString() + ")";
}
@@ -1136,28 +1136,28 @@ LogB.SQL(intervalSpeeds);
string extraWeight = "jump.weight*" + tps + ".weight/100.0";
string totalWeight = personWeight + " + " + extraWeight;
- if(indexType == Constants.PotencyLewisFormulaShort) {
+ if(indexType == Constants.PotencyLewisFormulaShortStr()) {
moreSelect =
ini + "2.21360 * 9.8 * (" + totalWeight + ") " + end + " AS indexPart1, " +
ini + jumpHeightInM + end + " AS indexPart2WithoutSqrt, ";
}
- else if (indexType == Constants.PotencyHarmanFormulaShort) {
+ else if (indexType == Constants.PotencyHarmanFormulaShortStr()) {
moreSelect =
ini + "((61.9 * 100 * " + jumpHeightInM + ") + (36 * (" + totalWeight + ")) -
1822)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that needs
to select two things
}
- else if (indexType == Constants.PotencySayersSJFormulaShort) {
+ else if (indexType == Constants.PotencySayersSJFormulaShortStr()) {
moreSelect =
ini + "((60.7 * 100 * " + jumpHeightInM + ") + (45.3 * (" + totalWeight + "))
- 2055)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that needs
to select two things
}
- else if (indexType == Constants.PotencySayersCMJFormulaShort) {
+ else if (indexType == Constants.PotencySayersCMJFormulaShortStr()) {
moreSelect =
ini + "((51.9 * 100 * " + jumpHeightInM + ") + (48.9 * (" + totalWeight + "))
- 2007)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that needs
to select two things
}
- else if (indexType == Constants.PotencyShettyFormulaShort) {
+ else if (indexType == Constants.PotencyShettyFormulaShortStr()) {
moreSelect =
ini + "((1925.72 * " + jumpHeightInM + ") + (14.74 * (" + totalWeight + ")) -
666.3)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that needs
to select two things
}
- else if (indexType == Constants.PotencyCanavanFormulaShort) {
+ else if (indexType == Constants.PotencyCanavanFormulaShortStr()) {
moreSelect =
ini + "((65.1 * 100 * " + jumpHeightInM + ") + (25.8 * (" + totalWeight + "))
- 1413.1)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that
needs to select two things
}
@@ -1165,23 +1165,23 @@ LogB.SQL(intervalSpeeds);
else if (indexType == Constants.PotencyBahamondeFormula) {
}
*/
- else if (indexType == Constants.PotencyLaraMaleApplicantsSCFormulaShort) {
+ else if (indexType == Constants.PotencyLaraMaleApplicantsSCFormulaShortStr()) {
moreSelect =
ini + "((62.5 * 100 * " + jumpHeightInM + ") + (50.3 * (" + totalWeight + "))
- 2184.7)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that
needs to select two things
}
- else if (indexType == Constants.PotencyLaraFemaleEliteVoleiFormulaShort) {
+ else if (indexType == Constants.PotencyLaraFemaleEliteVoleiFormulaShortStr()) {
moreSelect =
ini + "((83.1 * 100 * " + jumpHeightInM + ") + (42 * (" + totalWeight + ")) -
2488)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that needs
to select two things
}
- else if (indexType == Constants.PotencyLaraFemaleMediumVoleiFormulaShort) {
+ else if (indexType == Constants.PotencyLaraFemaleMediumVoleiFormulaShortStr()) {
moreSelect =
ini + "((53.6 * 100 * " + jumpHeightInM + ") + (67.5 * (" + totalWeight + "))
- 2624.1)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that
needs to select two things
}
- else if (indexType == Constants.PotencyLaraFemaleSCStudentsFormulaShort) {
+ else if (indexType == Constants.PotencyLaraFemaleSCStudentsFormulaShortStr()) {
moreSelect =
ini + "((56.7 * 100 * " + jumpHeightInM + ") + (47.2 * (" + totalWeight + "))
- 1772.6)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that
needs to select two things
}
- else if (indexType == Constants.PotencyLaraFemaleSedentaryFormulaShort) {
+ else if (indexType == Constants.PotencyLaraFemaleSedentaryFormulaShortStr()) {
moreSelect =
ini + "((68.2 * 100 * " + jumpHeightInM + ") + (40.8 * (" + totalWeight + "))
- 1731.1)" + end + ", 1, "; //the "1" is for selecting something for compatibility with potencyLewis that
needs to select two things
}
@@ -1244,7 +1244,7 @@ LogB.SQL(intervalSpeeds);
}
string indexValueString = "";
- if(indexType == Constants.PotencyLewisFormulaShort) {
+ if(indexType == Constants.PotencyLewisFormulaShortStr()) {
indexValueString =
(
Convert.ToDouble(Util.ChangeDecimalSeparator(reader[3].ToString()))
@@ -1310,7 +1310,7 @@ LogB.SQL(intervalSpeeds);
string fromString = " FROM run, " + tp + " ";
string runTypeString = " AND run.type == \"" + runType + "\" ";
- if(runType == Constants.AllRunsName) {
+ if(runType == Constants.AllRunsNameStr()) {
moreSelect = moreSelect + ", run.type ";
fromString = " FROM run, " + tp + ", runType ";
runTypeString = " AND run.Type == runType.name ";
@@ -1350,7 +1350,7 @@ LogB.SQL(intervalSpeeds);
if(showSex) {
showSexString = "." + reader[1].ToString() ;
}
- if(runType == Constants.AllRunsName && operationString != "AVG") {
+ if(runType == Constants.AllRunsNameStr() && operationString != "AVG") {
showRunTypeString = " (" + reader[6].ToString() + ")";
}
diff --git a/src/statType.cs b/src/statType.cs
index 7a896b16..3c929d6c 100644
--- a/src/statType.cs
+++ b/src/statType.cs
@@ -186,7 +186,7 @@ public class StatType {
public bool ChooseStat ()
{
- if ( statisticType == Constants.TypeSessionSummary ) {
+ if ( statisticType == Constants.TypeSessionSummaryStr() ) {
int jumperID = -1; //all jumpers
string jumperName = ""; //all jumpers
if(graph) {
@@ -195,7 +195,7 @@ public class StatType {
myStat = new StatGlobal(myStatTypeStruct, treeview_stats, jumperID,
jumperName);
}
}
- else if (statisticType == Constants.TypeJumperSummary)
+ else if (statisticType == Constants.TypeJumperSummaryStr())
{
if(statisticApplyTo.Length == 0) {
LogB.Information("Jumper-ret");
@@ -215,7 +215,7 @@ public class StatType {
jumperID, jumperName);
}
}
- else if(statisticType == Constants.TypeJumpsSimple)
+ else if(statisticType == Constants.TypeJumpsSimpleStr())
{
if(statisticApplyTo.Length == 0) {
LogB.Information("Simple-ret");
@@ -227,7 +227,7 @@ public class StatType {
string indexType = "";
if(statisticSubType == Catalog.GetString(Constants.SubtractionBetweenTests))
indexType = "subtraction";
- else if(statisticSubType == Constants.ChronojumpProfile)
+ else if(statisticSubType == Constants.ChronojumpProfileStr())
indexType = "ChronojumpProfile";
else if(statisticSubType == Constants.IeIndexFormula)
indexType = "IE";
@@ -240,18 +240,18 @@ public class StatType {
else if(statisticSubType == Constants.FvIndexFormula)
indexType = "F/V";
else if(
- statisticSubType == Constants.PotencyLewisFormulaShort ||
- statisticSubType == Constants.PotencyHarmanFormulaShort ||
- statisticSubType == Constants.PotencySayersSJFormulaShort ||
- statisticSubType == Constants.PotencySayersCMJFormulaShort ||
- statisticSubType == Constants.PotencyShettyFormulaShort ||
- statisticSubType == Constants.PotencyCanavanFormulaShort ||
+ statisticSubType == Constants.PotencyLewisFormulaShortStr() ||
+ statisticSubType == Constants.PotencyHarmanFormulaShortStr()
||
+ statisticSubType ==
Constants.PotencySayersSJFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencySayersCMJFormulaShortStr() ||
+ statisticSubType == Constants.PotencyShettyFormulaShortStr()
||
+ statisticSubType == Constants.PotencyCanavanFormulaShortStr()
||
//statisticSubType == Constants.PotencyBahamondeFormula ||
- statisticSubType ==
Constants.PotencyLaraMaleApplicantsSCFormulaShort ||
- statisticSubType ==
Constants.PotencyLaraFemaleEliteVoleiFormulaShort ||
- statisticSubType ==
Constants.PotencyLaraFemaleMediumVoleiFormulaShort ||
- statisticSubType ==
Constants.PotencyLaraFemaleSCStudentsFormulaShort ||
- statisticSubType ==
Constants.PotencyLaraFemaleSedentaryFormulaShort
+ statisticSubType ==
Constants.PotencyLaraMaleApplicantsSCFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencyLaraFemaleEliteVoleiFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencyLaraFemaleMediumVoleiFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencyLaraFemaleSCStudentsFormulaShortStr() ||
+ statisticSubType ==
Constants.PotencyLaraFemaleSedentaryFormulaShortStr()
) {
indexType = statisticSubType;
}
@@ -291,7 +291,7 @@ public class StatType {
//manage all weight jumps and the AllJumpsName (simple)
if(myType.HasWeight ||
- statisticApplyTo == Constants.AllJumpsName)
+ statisticApplyTo == Constants.AllJumpsNameStr())
{
if(graph)
myStat = new GraphSjCmjAbkPlus (myStatTypeStruct);
@@ -305,7 +305,7 @@ public class StatType {
}
}
}
- else if(statisticType == Constants.TypeJumpsSimpleWithTC)
+ else if(statisticType == Constants.TypeJumpsSimpleWithTCStr())
{
if(statisticApplyTo.Length == 0) {
LogB.Information("WithTC-ret");
@@ -340,7 +340,7 @@ public class StatType {
//heightPreferred is not used, check this
}
}
- else if(statisticType == Constants.TypeJumpsReactive) {
+ else if(statisticType == Constants.TypeJumpsReactiveStr()) {
if(statisticSubType == Catalog.GetString("Average Index"))
{
if(graph)
@@ -377,7 +377,7 @@ public class StatType {
myStat = new StatRjAVGSD(myStatTypeStruct, treeview_stats,
Constants.QIndexName);
}
}
- else if(statisticType == Constants.TypeRunsSimple)
+ else if(statisticType == Constants.TypeRunsSimpleStr())
{
if(statisticApplyTo.Length == 0) {
LogB.Information("Simple-ret");
@@ -389,7 +389,7 @@ public class StatType {
else
myStat = new StatRunSimple (myStatTypeStruct, treeview_stats);
}
- else if(statisticType == Constants.TypeRunsIntervallic)
+ else if(statisticType == Constants.TypeRunsIntervallicStr())
{
if(statisticApplyTo.Length == 0) {
LogB.Information("Simple-ret");
diff --git a/src/stats/graphs/global.cs b/src/stats/graphs/global.cs
index 5c6283c0..978c807e 100644
--- a/src/stats/graphs/global.cs
+++ b/src/stats/graphs/global.cs
@@ -141,7 +141,7 @@ public class GraphGlobal : StatGlobal
myValueBefore = stringFullResults[0];
} else {
if(myValueBefore.StartsWith("DjIndex") ||
- myValueBefore.StartsWith("RjIndex") ||
myValueBefore.StartsWith(Constants.RJPotencyBoscoName) ||
+ myValueBefore.StartsWith("RjIndex") ||
myValueBefore.StartsWith(Constants.RJPotencyBoscoNameStr()) ||
myValueBefore == "IE" || myValueBefore ==
Constants.ArmsUseIndexName) {
serieIndex.SerieData.Add(myValue);
//serieTv.SerieData.Add("-");
@@ -171,7 +171,7 @@ public class GraphGlobal : StatGlobal
string valueNoSex = stringFullResults[0];
if(valueNoSex.StartsWith("DjIndex") ||
valueNoSex.StartsWith("IndexQ") ||
- valueNoSex.StartsWith("RjIndex") ||
valueNoSex.StartsWith(Constants.RJPotencyBoscoName) ||
+ valueNoSex.StartsWith("RjIndex") ||
valueNoSex.StartsWith(Constants.RJPotencyBoscoNameStr()) ||
valueNoSex == "IE" || valueNoSex ==
Constants.ArmsUseIndexName || valueNoSex == "FV" ) {
mySerie.IsLeftAxis = false;
} else {
diff --git a/src/stats/graphs/rjPotencyBosco.cs b/src/stats/graphs/rjPotencyBosco.cs
index 9ee860dd..35c336ae 100644
--- a/src/stats/graphs/rjPotencyBosco.cs
+++ b/src/stats/graphs/rjPotencyBosco.cs
@@ -58,7 +58,7 @@ public class GraphRjPotencyBosco : StatRjPotencyBosco
CurrentGraphData.GraphTitle = "";
} else {
//CurrentGraphData.GraphTitle = this.ToString();
- CurrentGraphData.GraphTitle = Constants.RJPotencyBoscoName;
+ CurrentGraphData.GraphTitle = Constants.RJPotencyBoscoNameStr();
CurrentGraphData.GraphSubTitle = Constants.RJPotencyBoscoFormula;
}
diff --git a/src/stats/main.cs b/src/stats/main.cs
index 3b67c760..ecb0e236 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -1200,7 +1200,7 @@ public class Stat
}
//black only has no sense on barplot
- if(gro.Palette == Constants.GraphPaletteBlack)
+ if(gro.Palette == Constants.GraphPaletteBlackStr())
gro.Palette="gray.colors";
string rG = //rGraphString
@@ -1256,7 +1256,7 @@ public class Stat
string colorsi="colors[i]";
string colors="colors";
bool changedPalette = false;
- if(gro.Palette == Constants.GraphPaletteBlack) {
+ if(gro.Palette == Constants.GraphPaletteBlackStr()) {
colors1="'black'";
colorsi="'black'";
colors="'black'";
@@ -1279,7 +1279,7 @@ public class Stat
" legend('" + gro.Legend +"', legend=rownames(data), pch=c(1:length(rownames(data))),
cex=.7, col="+ colors +")\n";
if(changedPalette)
- gro.Palette=Constants.GraphPaletteBlack;
+ gro.Palette=Constants.GraphPaletteBlackStr();
//have an unique title for both graphs
string titStr = getTitle("Lines", "");
@@ -1332,7 +1332,7 @@ public class Stat
string colors="colors";
bool changedPalette = false;
- if(gro.Palette == Constants.GraphPaletteBlack) {
+ if(gro.Palette == Constants.GraphPaletteBlackStr()) {
colors="'black'";
gro.Palette="gray.colors";
changedPalette = true;
@@ -1363,7 +1363,7 @@ public class Stat
"text(newx[length(newx)],prd[length(newx),2],'90%', cex=0.6)\n";
if(changedPalette)
- gro.Palette=Constants.GraphPaletteBlack;
+ gro.Palette=Constants.GraphPaletteBlackStr();
return allData + rG;
}
diff --git a/src/stats/potency.cs b/src/stats/potency.cs
index d45ed7a1..fd7ea1df 100644
--- a/src/stats/potency.cs
+++ b/src/stats/potency.cs
@@ -137,28 +137,28 @@ public class StatPotency : Stat
}
string indexTypePrint = indexType;
- if(indexType == Constants.PotencyLewisFormulaShort)
- indexTypePrint = Constants.PotencyLewisFormula;
- else if(indexType == Constants.PotencyHarmanFormulaShort)
- indexTypePrint = Constants.PotencyHarmanFormula;
- else if(indexType == Constants.PotencySayersSJFormulaShort)
- indexTypePrint = Constants.PotencySayersSJFormula;
- else if(indexType == Constants.PotencySayersCMJFormulaShort)
- indexTypePrint = Constants.PotencySayersCMJFormula;
- else if(indexType == Constants.PotencyShettyFormulaShort)
- indexTypePrint = Constants.PotencyShettyFormula;
- else if(indexType == Constants.PotencyCanavanFormulaShort)
- indexTypePrint = Constants.PotencyCanavanFormula;
- else if(indexType == Constants.PotencyLaraMaleApplicantsSCFormulaShort)
- indexTypePrint = Constants.PotencyLaraMaleApplicantsSCFormula;
- else if(indexType == Constants.PotencyLaraFemaleEliteVoleiFormulaShort)
- indexTypePrint = Constants.PotencyLaraFemaleEliteVoleiFormula;
- else if(indexType == Constants.PotencyLaraFemaleMediumVoleiFormulaShort)
- indexTypePrint = Constants.PotencyLaraFemaleMediumVoleiFormula;
- else if(indexType == Constants.PotencyLaraFemaleSCStudentsFormulaShort)
- indexTypePrint = Constants.PotencyLaraFemaleSCStudentsFormula;
- else if(indexType == Constants.PotencyLaraFemaleSedentaryFormulaShort)
- indexTypePrint = Constants.PotencyLaraFemaleSedentaryFormula;
+ if(indexType == Constants.PotencyLewisFormulaShortStr())
+ indexTypePrint = Constants.PotencyLewisFormulaStr();
+ else if(indexType == Constants.PotencyHarmanFormulaShortStr())
+ indexTypePrint = Constants.PotencyHarmanFormulaStr();
+ else if(indexType == Constants.PotencySayersSJFormulaShortStr())
+ indexTypePrint = Constants.PotencySayersSJFormulaStr();
+ else if(indexType == Constants.PotencySayersCMJFormulaShortStr())
+ indexTypePrint = Constants.PotencySayersCMJFormulaStr();
+ else if(indexType == Constants.PotencyShettyFormulaShortStr())
+ indexTypePrint = Constants.PotencyShettyFormulaStr();
+ else if(indexType == Constants.PotencyCanavanFormulaShortStr())
+ indexTypePrint = Constants.PotencyCanavanFormulaStr();
+ else if(indexType == Constants.PotencyLaraMaleApplicantsSCFormulaShortStr())
+ indexTypePrint = Constants.PotencyLaraMaleApplicantsSCFormulaStr();
+ else if(indexType == Constants.PotencyLaraFemaleEliteVoleiFormulaShortStr())
+ indexTypePrint = Constants.PotencyLaraFemaleEliteVoleiFormulaStr();
+ else if(indexType == Constants.PotencyLaraFemaleMediumVoleiFormulaShortStr())
+ indexTypePrint = Constants.PotencyLaraFemaleMediumVoleiFormulaStr();
+ else if(indexType == Constants.PotencyLaraFemaleSCStudentsFormulaShortStr())
+ indexTypePrint = Constants.PotencyLaraFemaleSCStudentsFormulaStr();
+ else if(indexType == Constants.PotencyLaraFemaleSedentaryFormulaShortStr())
+ indexTypePrint = Constants.PotencyLaraFemaleSedentaryFormulaStr();
return string.Format(Catalog.GetString("{0} in {1} applied to {2} on {3}"),
selectedValuesString, indexTypePrint, jumpType, mySessionString);
}
diff --git a/src/treeViewJump.cs b/src/treeViewJump.cs
index 4acf16a6..945b0b75 100644
--- a/src/treeViewJump.cs
+++ b/src/treeViewJump.cs
@@ -59,7 +59,7 @@ public class TreeViewJumps : TreeViewEvent
treeviewHasTwoLevels = false;
dataLineNamePosition = 0; //position of name in the data to be printed
dataLineTypePosition = 4; //position of type in the data to be printed
- allEventsName = Constants.AllJumpsName;
+ allEventsName = Constants.AllJumpsNameStr();
if(preferences.weightStatsPercent)
weightName += "\n(%)";
@@ -175,7 +175,7 @@ public class TreeViewJumps : TreeViewEvent
string title = newJump.Type;
if(newJump.Simulated == Constants.Simulated)
- title += Constants.SimulatedTreeview;
+ title += Constants.SimulatedTreeviewStr();
string [] myData = new String [getColsNum()];
int count = 0;
@@ -255,7 +255,7 @@ public class TreeViewJumpsRj : TreeViewJumps
treeviewHasTwoLevels = true;
dataLineNamePosition = 0; //position of name in the data to be printed
dataLineTypePosition = 4; //position of type in the data to be printed
- allEventsName = Constants.AllJumpsName;
+ allEventsName = Constants.AllJumpsNameStr();
if(preferences.weightStatsPercent)
weightName += "\n(%)";
@@ -301,7 +301,7 @@ public class TreeViewJumpsRj : TreeViewJumps
string title = newJumpRj.Type;
if(newJumpRj.Simulated == Constants.Simulated)
- title += Constants.SimulatedTreeview + " ";
+ title += Constants.SimulatedTreeviewStr() + " ";
string myTypeComplet = "";
if(newJumpRj.Type == Constants.RunAnalysisName)
diff --git a/src/treeViewMultiChronopic.cs b/src/treeViewMultiChronopic.cs
index f196bbdc..f8bc1969 100644
--- a/src/treeViewMultiChronopic.cs
+++ b/src/treeViewMultiChronopic.cs
@@ -118,7 +118,7 @@ public class TreeViewMultiChronopic : TreeViewEvent
title = mc.Type + " " + typeExtra;
title += " " + array.Count.ToString() +"n";
if(mc.Simulated == Constants.Simulated)
- title += Constants.SimulatedTreeview + " ";
+ title += Constants.SimulatedTreeviewStr() + " ";
string [] myData = new String [19+1];
int count = 0;
diff --git a/src/treeViewPulse.cs b/src/treeViewPulse.cs
index c516ca82..2d88d1a1 100644
--- a/src/treeViewPulse.cs
+++ b/src/treeViewPulse.cs
@@ -40,7 +40,7 @@ public class TreeViewPulses : TreeViewEvent
treeviewHasTwoLevels = true;
dataLineNamePosition = 0; //position of name in the data to be printed
dataLineTypePosition = 4; //position of type in the data to be printed
- allEventsName = Constants.AllPulsesName;
+ allEventsName = Constants.AllPulsesNameStr();
eventIDColumn = 5; //column where the uniqueID of event will be (and will be hidden)
string jumperName = Catalog.GetString("Person");
@@ -74,7 +74,7 @@ public class TreeViewPulses : TreeViewEvent
string myTypeComplet = newPulse.Type;
if(newPulse.Simulated == Constants.Simulated)
- myTypeComplet += Constants.SimulatedTreeview + " ";
+ myTypeComplet += Constants.SimulatedTreeviewStr() + " ";
if(newPulse.FixedPulse != -1)
myTypeComplet += "(" + Util.TrimDecimals(newPulse.FixedPulse.ToString(), 3) + ")";
diff --git a/src/treeViewReactionTime.cs b/src/treeViewReactionTime.cs
index 1aef742b..a53d0eca 100644
--- a/src/treeViewReactionTime.cs
+++ b/src/treeViewReactionTime.cs
@@ -73,7 +73,7 @@ public class TreeViewReactionTimes : TreeViewEvent
string title = "";
if(newReactionTime.Simulated == Constants.Simulated)
- title += Constants.SimulatedTreeview + " ";
+ title += Constants.SimulatedTreeviewStr() + " ";
string [] myData = new String [getColsNum()];
int count = 0;
diff --git a/src/treeViewRun.cs b/src/treeViewRun.cs
index 02db774a..1f46c78f 100644
--- a/src/treeViewRun.cs
+++ b/src/treeViewRun.cs
@@ -43,7 +43,7 @@ public class TreeViewRuns : TreeViewEvent
treeviewHasTwoLevels = false;
dataLineNamePosition = 0; //position of name in the data to be printed
dataLineTypePosition = 4; //position of type in the data to be printed
- allEventsName = Constants.AllRunsName;
+ allEventsName = Constants.AllRunsNameStr();
eventIDColumn = 5; //column where the uniqueID of event will be (and will be hidden)
string runnerName = Catalog.GetString("Runner");
@@ -82,7 +82,7 @@ public class TreeViewRuns : TreeViewEvent
string title = newRun.Type;
if(newRun.Simulated == Constants.Simulated)
- title += Constants.SimulatedTreeview;
+ title += Constants.SimulatedTreeviewStr();
string [] myData = new String [getColsNum()];
int count = 0;
@@ -135,7 +135,7 @@ public class TreeViewRunsInterval : TreeViewRuns
treeviewHasTwoLevels = true;
dataLineNamePosition = 0; //position of name in the data to be printed
dataLineTypePosition = 4; //position of type in the data to be printed
- allEventsName = Constants.AllRunsName;
+ allEventsName = Constants.AllRunsNameStr();
eventIDColumn = 5; //column where the uniqueID of event will be (and will be hidden)
columnsString = new string[]{runnerName, speedName, lapTimeName, splitTimeName,
descriptionName};
@@ -169,7 +169,7 @@ public class TreeViewRunsInterval : TreeViewRuns
string title = newRunI.Type;
if(newRunI.Simulated == Constants.Simulated)
- title += Constants.SimulatedTreeview + " ";
+ title += Constants.SimulatedTreeviewStr() + " ";
string myTypeComplet = title + "(" + newRunI.DistanceInterval + "x" +
Util.GetLimitedRounded(newRunI.Limited, pDN) + ")";
diff --git a/src/util.cs b/src/util.cs
index a16262b2..3bc51dc7 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -1901,9 +1901,9 @@ public class Util
public static string BoolToInOut (bool areWeIn) {
if(areWeIn)
- return Constants.In;
+ return Constants.InStr();
else
- return Constants.Out;
+ return Constants.OutStr();
}
public static int BoolToInt (bool myBool) {
@@ -1933,7 +1933,7 @@ public class Util
public static string FindLevelName(int levelInt) {
string foundLevelName = "";
- foreach(string level in Constants.Levels)
+ foreach(string level in Constants.LevelsStr())
if(FetchID(level) == levelInt)
foundLevelName = FetchName(level);
@@ -2028,16 +2028,16 @@ public class Util
public static string SimulatedTestNoYes(int num) {
if(num < 0)
- return Constants.Yes;
+ return Constants.YesStr();
else
- return Constants.No;
+ return Constants.NoStr();
}
public static string NoYes(bool b) {
if(! b)
- return Constants.No;
+ return Constants.NoStr();
else
- return Constants.Yes;
+ return Constants.YesStr();
}
diff --git a/src/utilAll.cs b/src/utilAll.cs
index 80ba096e..2c628435 100644
--- a/src/utilAll.cs
+++ b/src/utilAll.cs
@@ -128,7 +128,7 @@ public class UtilAll
string detected = "";
string [] usbSerial = Directory.GetFiles("/dev/", "ttyUSB*");
if(usbSerial.Length > 0) {
- detected += Constants.FoundUSBSerialPortsString + " " + usbSerial.Length + "\n" +
startStr;
+ detected += Constants.FoundUSBSerialPortsString() + " " + usbSerial.Length + "\n" +
startStr;
foreach(string myPort in usbSerial)
detected += midStr + myPort;
detected += endStr;
diff --git a/src/utilEncoder.cs b/src/utilEncoder.cs
index 9a52d736..4c343975 100644
--- a/src/utilEncoder.cs
+++ b/src/utilEncoder.cs
@@ -149,8 +149,8 @@ public class UtilEncoder
GetEncoderSessionDataSignalDir(sessionID) +
Path.DirectorySeparatorChar + fileName, true);
} catch {
- new DialogMessage(Constants.MessageTypes.WARNING,
Constants.FileCopyProblem);
- LogB.Error(Constants.FileCopyProblem);
+ new DialogMessage(Constants.MessageTypes.WARNING,
Constants.FileCopyProblemStr());
+ LogB.Error(Constants.FileCopyProblemStr());
return "";
}
// }
@@ -166,15 +166,15 @@ public class UtilEncoder
try {
File.Copy(origin, dest, true);
} catch {
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileCopyProblem);
- LogB.Error(Constants.FileCopyProblem);
+ new DialogMessage(Constants.MessageTypes.WARNING,
Constants.FileCopyProblemStr());
+ LogB.Error(Constants.FileCopyProblemStr());
return false;
}
return true;
}
- new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileNotFound);
- LogB.Error(Constants.FileNotFound);
+ new DialogMessage(Constants.MessageTypes.WARNING, Constants.FileNotFoundStr());
+ LogB.Error(Constants.FileNotFoundStr());
return false;
}
diff --git a/src/version31.cs b/src/version31.cs
index c3e215ea..7924ace2 100644
--- a/src/version31.cs
+++ b/src/version31.cs
@@ -129,11 +129,12 @@ public class VersionCompare
get
{
if(Result == ResultType.EQUAL)
- return Constants.SoftwareUpdated;
+ //return Constants.GetTranslated(Constants.SoftwareUpdated);
+ return Constants.SoftwareUpdatedStr();
else if(Result == ResultType.LOWER)
- return Constants.SoftwareNeedUpdate;
+ return Constants.SoftwareNeedUpdateStr();
else
- return Constants.SoftwareNewerThanPublised;
+ return Constants.SoftwareNewerThanPublisedStr();
}
}
}
diff --git a/src/webcam/webcamFfmpeg.cs b/src/webcam/webcamFfmpeg.cs
index 426bd906..e73fcb06 100644
--- a/src/webcam/webcamFfmpeg.cs
+++ b/src/webcam/webcamFfmpeg.cs
@@ -445,7 +445,7 @@ public class WebcamFfmpeg : Webcam
//but only if the test has not been cancelled
if(testID != -1)
if (! Util.CopyTempVideo(sessionID, testType, testID))
- return new Result (false, "", Constants.FileCopyProblem);
+ return new Result (false, "", Constants.FileCopyProblemStr());
//Delete temp video
deleteTempFiles();
diff --git a/src/webcam/webcamFfmpegDevices.cs b/src/webcam/webcamFfmpegDevices.cs
index dc83337d..f5a1988c 100644
--- a/src/webcam/webcamFfmpegDevices.cs
+++ b/src/webcam/webcamFfmpegDevices.cs
@@ -160,7 +160,7 @@ public class WebcamFfmpegGetDevicesLinux : WebcamFfmpegGetDevices
found = true;
}
if(! found)
- wd_list.Error = Constants.CameraNotFound;
+ wd_list.Error = Constants.CameraNotFoundStr();
return wd_list;
}
@@ -198,7 +198,7 @@ public abstract class WebcamFfmpegGetDevicesWinMac : WebcamFfmpegGetDevices
if( ! executableExists())
{
LogB.Information(string.Format("File {0} does not exists, but note execuble
can be on path", executable));
- wd_list.Error = Constants.FfmpegNotInstalled;
+ wd_list.Error = Constants.FfmpegNotInstalledStr();
return wd_list;
}
@@ -224,7 +224,7 @@ public abstract class WebcamFfmpegGetDevicesWinMac : WebcamFfmpegGetDevices
return wd_list;
}
- wd_list.Error = Constants.CameraNotFound;
+ wd_list.Error = Constants.CameraNotFoundStr();
}
else
parse(execute_result.stdout);
diff --git a/src/webcam/webcamMplayer.cs b/src/webcam/webcamMplayer.cs
index 5d271234..33e16065 100644
--- a/src/webcam/webcamMplayer.cs
+++ b/src/webcam/webcamMplayer.cs
@@ -193,7 +193,7 @@ public class WebcamMplayer : Webcam
ExitCamera();
if(! findIfThereAreImagesToConvert())
- return new Result (false, "", Constants.VideoNothingCaptured);
+ return new Result (false, "", Constants.VideoNothingCapturedStr());
//Convert video to the name and format expected
if(! convertImagesToVideo())
@@ -204,7 +204,7 @@ public class WebcamMplayer : Webcam
//Copy the video to expected place
if (! Util.CopyTempVideo(sessionID, testType, testID))
- return new Result (false, "", Constants.FileCopyProblem);
+ return new Result (false, "", Constants.FileCopyProblemStr());
//Delete temp photos and video
deleteTempFiles();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]