[chronojump] code clean
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] code clean
- Date: Wed, 27 Feb 2013 18:50:26 +0000 (UTC)
commit 420534f9532948d5ef529b2534734bf211c8677b
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Feb 27 19:50:16 2013 +0100
code clean
src/gui/encoder.cs | 134 ----------------------------------------------------
1 files changed, 0 insertions(+), 134 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index fd4b9ed..944d30a 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1547,141 +1547,7 @@ public partial class ChronoJumpWindow
/* TreeView stuff */
//returns curves num
- //bool captureOrAnalyze means capture when true, and analyze when false
//capture has single and multiple selection in order to save curves... Analyze only shows data.
- /*
- private int createTreeViewEncoder(bool captureOrAnalyze, string contents) {
- string [] columnsString = {
- Catalog.GetString("Curve") + "\n",
- Catalog.GetString("Start") + "\n (s)",
- Catalog.GetString("Duration") + "\n (s)",
- Catalog.GetString("Range") + "\n (cm)",
- Catalog.GetString("MeanSpeed") + "\n (m/s)",
- Catalog.GetString("MaxSpeed") + "\n (m/s)",
- Catalog.GetString("MeanPower") + "\n (W)",
- Catalog.GetString("PeakPower") + "\n (W)",
- Catalog.GetString("PeakPowerTime") + "\n (s)",
- Catalog.GetString("PeakPower/PPT") + "\n (W/s)"
- };
-
- if(captureOrAnalyze)
- encoderCaptureCurves = new ArrayList ();
- else
- encoderAnalyzeCurves = new ArrayList ();
-
- string line;
- int curvesCount = 0;
- using (StringReader reader = new StringReader (contents)) {
- line = reader.ReadLine (); //headers
- Log.WriteLine(line);
- do {
- line = reader.ReadLine ();
- Log.WriteLine(line);
- if (line == null)
- break;
-
- curvesCount ++;
-
- string [] cells = line.Split(new char[] {','});
- cells = fixDecimals(cells);
-
- if(captureOrAnalyze)
- encoderCaptureCurves.Add (new EncoderCurve (cells[0], cells[1],
cells[2],
- cells[3], cells[4], cells[5], cells[6],
- cells[7], cells[8], cells[9]));
- else
- encoderAnalyzeCurves.Add (new EncoderCurve (cells[0], cells[1],
cells[2],
- cells[3], cells[4], cells[5], cells[6],
- cells[7], cells[8], cells[9]));
-
- } while(true);
- }
-
- if(captureOrAnalyze) {
- encoderCaptureListStore = new Gtk.ListStore (typeof (EncoderCurve));
- foreach (EncoderCurve curve in encoderCaptureCurves)
- encoderCaptureListStore.AppendValues (curve);
-
- treeview_encoder_capture_curves.Model = encoderCaptureListStore;
-
- if(ecconLast == "c")
- treeview_encoder_capture_curves.Selection.Mode = SelectionMode.Single;
- else
- treeview_encoder_capture_curves.Selection.Mode = SelectionMode.Multiple;
-
- treeview_encoder_capture_curves.HeadersVisible=true;
- } else {
- encoderAnalyzeListStore = new Gtk.ListStore (typeof (EncoderCurve));
- foreach (EncoderCurve curve in encoderAnalyzeCurves)
- encoderAnalyzeListStore.AppendValues (curve);
-
- treeview_encoder_analyze_curves.Model = encoderAnalyzeListStore;
-
- treeview_encoder_analyze_curves.Selection.Mode = SelectionMode.None;
-
- treeview_encoder_analyze_curves.HeadersVisible=true;
- }
-
- int i=0;
- foreach(string myCol in columnsString) {
- Gtk.TreeViewColumn aColumn = new Gtk.TreeViewColumn ();
- CellRendererText aCell = new CellRendererText();
- aColumn.Title=myCol;
- aColumn.PackStart (aCell, true);
-
- //crt1.Foreground = "red";
- //crt1.Background = "blue";
-
- switch(i){
- case 0:
- if(captureOrAnalyze)
- aColumn.SetCellDataFunc (
- aCell, new Gtk.TreeCellDataFunc (RenderN));
- else
- aColumn.SetCellDataFunc (
- aCell, new Gtk.TreeCellDataFunc
(RenderNAnalyze));
- break;
- case 1:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderStart));
- break;
- case 2:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderDuration));
- break;
- case 3:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderHeight));
- break;
- case 4:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderMeanSpeed));
- break;
- case 5:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderMaxSpeed));
- break;
- case 6:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderMeanPower));
- break;
- case 7:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderPeakPower));
- break;
- case 8:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderPeakPowerT));
- break;
- case 9:
- aColumn.SetCellDataFunc (aCell, new Gtk.TreeCellDataFunc
(RenderPP_PPT));
- break;
- }
-
-
- if(captureOrAnalyze)
- treeview_encoder_capture_curves.AppendColumn (aColumn);
- else
- treeview_encoder_analyze_curves.AppendColumn (aColumn);
-
- i++;
- }
- return curvesCount;
- }
- */
-
private int createTreeViewEncoderCapture(string contents) {
string [] columnsString = {
Catalog.GetString("Curve") + "\n",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]