[chronojump] On export encoder tables "ms" is correctly shown now
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] On export encoder tables "ms" is correctly shown now
- Date: Fri, 9 Dec 2016 16:42:08 +0000 (UTC)
commit d3bed58b896ba3bd6b5cb72eec671a705c05f9ef
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Dec 9 17:41:38 2016 +0100
On export encoder tables "ms" is correctly shown now
src/gui/encoder.cs | 2 +-
src/gui/encoderTreeviews.cs | 55 +++++++++++++++++++++++++------------------
2 files changed, 33 insertions(+), 24 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 3246a18..0989694 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -3292,7 +3292,7 @@ public partial class ChronoJumpWindow
} else {
//write header
writer.WriteLine(Util.RemoveNewLine(Util.StringArrayToString(
- treeviewEncoderAnalyzeHeaders, sep), false));
+ GetTreeviewEncoderAnalyzeHeaders(false), sep),
false));
//write curves rows
ArrayList array = getTreeViewCurves(encoderAnalyzeListStore);
foreach (EncoderCurve ec in array)
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index 5bb1789..350cab4 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -485,33 +485,42 @@ public partial class ChronoJumpWindow
}
- string [] treeviewEncoderAnalyzeHeaders = {
- Catalog.GetString("Repetition") + "\n",
- Catalog.GetString("Series") + "\n",
- Catalog.GetString("Exercise") + "\n",
- Catalog.GetString("Laterality") + "\n",
- Catalog.GetString("Extra weight") + "\n (Kg)",
- Catalog.GetString("Total weight") + "\n (Kg)",
- Catalog.GetString("Inertia M.") + "\n (Kg*cm^2)",
- Catalog.GetString("Start") + "\n (s)",
- Catalog.GetString("Duration") + "\n (s)",
- Catalog.GetString("Distance") + "\n (cm)",
- "v" + "\n (m/s)",
- "vmax" + "\n (m/s)",
- "t->vmax" + "\n (s)",
- "p" + "\n (W)",
- "pmax" + "\n (W)",
- "t->pmax" + "\n (s)",
- "pmax/t->pmax" + "\n (W/s)",
- "F" + "\n (N)",
- "Fmax" + "\n (N)",
- "t->Fmax" + "\n (s)"
- };
+ //on screen shown on s but export is in ms
+ public string [] GetTreeviewEncoderAnalyzeHeaders(bool screenOrCSV)
+ {
+ string timeUnits = "(s)";
+ if(! screenOrCSV)
+ timeUnits = "(ms)";
+
+ string [] treeviewEncoderAnalyzeHeaders = {
+ Catalog.GetString("Repetition") + "\n",
+ Catalog.GetString("Series") + "\n",
+ Catalog.GetString("Exercise") + "\n",
+ Catalog.GetString("Laterality") + "\n",
+ Catalog.GetString("Extra weight") + "\n(Kg)",
+ Catalog.GetString("Total weight") + "\n(Kg)",
+ Catalog.GetString("Inertia M.") + "\n(Kg*cm^2)",
+ Catalog.GetString("Start") + "\n" + timeUnits,
+ Catalog.GetString("Duration") + "\n" + timeUnits,
+ Catalog.GetString("Distance") + "\n(cm)",
+ "v" + "\n(m/s)",
+ "vmax" + "\n(m/s)",
+ "t->vmax" + "\n" + timeUnits,
+ "p" + "\n(W)",
+ "pmax" + "\n(W)",
+ "t->pmax" + "\n" + timeUnits,
+ "pmax/t->pmax" + "\n(W/s)",
+ "F" + "\n(N)",
+ "Fmax" + "\n(N)",
+ "t->Fmax" + "\n" + timeUnits
+ };
+ return treeviewEncoderAnalyzeHeaders;
+ }
bool lastTreeviewEncoderAnalyzeIsNeuromuscular = false;
private int createTreeViewEncoderAnalyze(string contents) {
- string [] columnsString = treeviewEncoderAnalyzeHeaders;
+ string [] columnsString = GetTreeviewEncoderAnalyzeHeaders(true); //screen
ArrayList encoderAnalyzeCurves = new ArrayList ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]