Commit c473c0f7 authored by Xavier de Blas's avatar Xavier de Blas

report allows seing graph of any stat

improved report gui
fixed more licensing notes
parent df2b0f66
......@@ -9,7 +9,7 @@ Copyright: 2004-2009, Xavier de Blas <xaviblas@gmail.com>
License: GPL-2+
Files: chronopic-test/*
Copyright: 2005 Juan Gonzalez Gomez
Copyright: 1997, 2004-2005 Juan Gonzalez Gomez
License: GPL-2+
Files: chronopic-test/termansi.*
......
/*
* Copyright (C) 2004 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/***************************************************************************/
/* chronopic-serial-conf.c */
/* (c) Juan Gonzalez. 2004 */
/*-------------------------------------------------------------------------*/
/* Configurar el puerto serie para trabajar con chronopic */
/* Este programa tiene las siguientes funciones: */
......@@ -15,9 +31,6 @@
/* */
/* 2) Tener disponibles las funciones en C, para poderlas utilizar */
/* desde otros programas en C, o crear una libreria especifica */
/*-------------------------------------------------------------------------*/
/* Licencia GPL */
/***************************************************************************/
/*-------------------------------------------------------------------------
$Id: chronopic-serial-conf.c,v 1.1 2005/02/07 11:14:54 obijuan Exp $
$Revision: 1.1 $
......
/***********************************************************/
/* chronopic.c Juan Gonzalez Gomez. Febrero 2005 */
/*
* Copyright (C) 2005 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*---------------------------------------------------------*/
/* Funciones de acceso a chronopic */
/* Licencia GPL */
......
/**********************************************/
/* chronopic.cs Juan Gonzalez Gomez. */
/*--------------------------------------------*/
/* Licencia GPL */
/**********************************************/
/*
* Copyright (C) 2005 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*------------------------------------------------------------------------
$Id: chronopic.cs,v 1.1 2005/02/07 11:14:54 obijuan Exp $
$Revision: 1.1 $
......
/************************************************************************/
/* TERMANS.C. (C) Grupo J&J. Noviembre 1997. */
/*
* Copyright (C) 1997 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* -------------------------------------------------------------------- */
/* Funciones para actuar sobre terminales ansi: cambiar el color, */
/* borrar la pantalla... */
......
/*
* Copyright (C) 1997 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#define NEGRO 0
#define AZUL 4
#define VERDE 2
......
/***************************************************************************/
/* test-precision.c (c) Juan Gonzalez. Febrero 2005 */
/*
* Copyright (C) 2005 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*-------------------------------------------------------------------------*/
/* Comprobacion de la precision de Chronopic. Se mide mide el periodo y la */
/* frecuencia de senales cuadradas aplicadas a Chronopic. De esta manera */
/* se puede comprobar cual es la precision en la medida */
/* Sirve para validar Chronopic */
/*-------------------------------------------------------------------------*/
/* Licencia GPL */
/***************************************************************************/
/*-------------------------------------------------------------------------
$Id: test-precision.c,v 1.1 2005/02/07 11:14:54 obijuan Exp $
$Revision: 1.1 $
......
/***************************************************************************/
/* test-saltos.c (c) Juan Gonzalez. Febrero 2005 */
/*-------------------------------------------------------------------------*/
/*
* Copyright (C) 2005 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Pruebas de medidion de saltos. Se mide el tiempo de vuelo de los saltos */
/* realizados, mostrandose los resultados por la pantalla */
/*-------------------------------------------------------------------------*/
/* Licencia GPL */
/***************************************************************************/
/*-------------------------------------------------------------------------
$Id: test-saltos.c,v 1.1 2005/02/07 11:14:54 obijuan Exp $
$Revision: 1.1 $
......
/***********************************************************/
/* test-saltos.mono Juan Gonzalez Gomez. Febrero 2005 */
/*
* Copyright (C) 2005 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*---------------------------------------------------------*/
/* Medir el tiempo de vuelo de los saltos */
/* Licencia GPL */
......
/***************************************************************************/
/* test-tramas.c */
/* (c) Juan Gonzalez. 2005 */
/*
* Copyright (C) 2005 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*-------------------------------------------------------------------------*/
/* Visualizacion de las tramas enviadas por ChronoPic. Es muy util para */
/* hacer pruebas y comprobar si el hardware esta funcionando correctamente */
/*-------------------------------------------------------------------------*/
/* Licencia GPL */
/***************************************************************************/
/*-------------------------------------------------------------------------
$Id: test-tramas.c,v 1.1 2005/02/07 11:14:54 obijuan Exp $
$Revision: 1.1 $
......
/*
* Copyright (C) 2005 Juan Gonzalez Gomez
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
using System.Collections;
using Gtk;
......
......@@ -7908,8 +7908,6 @@ suitable for agility tests)</property>
<widget class="GtkWindow" id="report_window">
<property name="border_width">10</property>
<property name="width_request">550</property>
<property name="height_request">420</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Chronojump Report window</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
......@@ -8418,6 +8416,7 @@ suitable for agility tests)</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow21">
<property name="width_request">400</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
......@@ -8485,19 +8484,149 @@ suitable for agility tests)</property>
</child>
<child>
<widget class="GtkAlignment" id="alignment_button_delete">
<widget class="GtkButton" id="button_graph">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<property name="tooltip" translatable="yes">Graph this statistic</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_graph_clicked" last_modification_time="Sat, 19 Feb 2005 17:36:34 GMT"/>
<child>
<placeholder/>
<widget class="GtkAlignment" id="alignment146">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox377">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image_report_win_graph">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label773">
<property name="visible">True</property>
<property name="label" translatable="yes">See graph</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkButton" id="button_add_comment">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_add_comment_clicked" last_modification_time="Fri, 04 Sep 2009 12:27:28 GMT"/>
<child>
<widget class="GtkAlignment" id="alignment147">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox378">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image4481">
<property name="visible">True</property>
<property name="stock">gtk-edit</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label774">
<property name="visible">True</property>
<property name="label" translatable="yes">Add comment</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
......@@ -43,8 +43,8 @@ public class ExportSession
protected string fileName;
protected int prefsDigitsNumber;
protected bool heightPreferred;
protected bool weightStatsPercent;
public bool heightPreferred;
public bool weightStatsPercent;
protected string spreadsheetString;
......
......@@ -46,18 +46,19 @@ public class ReportWindow {
[Widget] Gtk.CheckButton cb_runs_interval_with_subruns;
[Widget] Gtk.CheckButton cb_reaction_times;
[Widget] Gtk.CheckButton cb_pulses;
[Widget] Gtk.Image image_report_win_graph;
[Widget] Gtk.Image image_report_win_report;
static ReportWindow ReportWindowBox;
Gtk.Window parent;
//protected int sessionID;
//private int sessionID;
Report report;
protected ReportWindow () {
private ReportWindow () {
}
ReportWindow (Gtk.Window parent, Report report ) {
......@@ -115,11 +116,14 @@ public class ReportWindow {
}
private void putNonStandardIcons() {
Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_task-assigned.png");
Pixbuf pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "gpm-statistics.png");
image_report_win_graph.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_task-assigned.png");
image_report_win_report.Pixbuf = pixbuf;
}
protected void createTreeView (Gtk.TreeView tv) {
private void createTreeView (Gtk.TreeView tv) {
tv.HeadersVisible=true;
int count = 0;
tv.AppendColumn ( Catalog.GetString("Type"), new CellRendererText(), "text", count++);
......@@ -202,7 +206,7 @@ public class ReportWindow {
report_window.Show ();
}
protected virtual void on_cb_jumps_reactive_clicked (object o, EventArgs args) {
private void on_cb_jumps_reactive_clicked (object o, EventArgs args) {
if(cb_jumps_reactive.Active) {
cb_jumps_reactive_with_subjumps.Show();
} else {
......@@ -210,7 +214,7 @@ public class ReportWindow {
}
}
protected virtual void on_cb_runs_interval_clicked (object o, EventArgs args) {
private void on_cb_runs_interval_clicked (object o, EventArgs args) {
if(cb_runs_interval.Active) {
cb_runs_interval_with_subruns.Show();
} else {
......@@ -218,7 +222,7 @@ public class ReportWindow {
}
}
protected virtual void onSelectionEntry (object o, EventArgs args)
private void onSelectionEntry (object o, EventArgs args)
{
//TreeView tv = (TreeView) o;
TreeModel model;
......@@ -231,7 +235,7 @@ public class ReportWindow {
}
}
protected virtual void on_button_up_clicked (object o, EventArgs args) {
private void on_button_up_clicked (object o, EventArgs args) {
if(selected)
{
TreeModel model;
......@@ -251,7 +255,7 @@ public class ReportWindow {
}
}
protected virtual void on_button_down_clicked (object o, EventArgs args) {
private void on_button_down_clicked (object o, EventArgs args) {
if(selected)
{
TreeModel model;
......@@ -271,7 +275,61 @@ public class ReportWindow {
}
}
protected virtual void on_button_delete_clicked (object o, EventArgs args) {
private void on_button_graph_clicked (object o, EventArgs args) {
if(selected)
{
TreeModel model;
TreeIter iter1;
if (treeview1.Selection.GetSelected (out model, out iter1)) {
string str=getRow(iter1);
string [] statRow = str.ToString().Split(new char[] {'\t'});
string subType;
int rj_evolution_mark_consecutives = report.GetRjEvolutionMarkConsecutives(statRow[1], out subType);
ArrayList sendSelectedSessions = report.GetSelectedSessions(statRow[3]);
Gtk.TreeView treeviewFake = new Gtk.TreeView(); //not needed for graph
bool showSex = Util.StringToBool(statRow[5]);
int limit = -1;
int statsJumpsType = report.GetStatsJumpTypeAndLimit(statRow[4], out limit);
ArrayList arrayListMarkedRows = Util.StringToArrayList(statRow[6], ':');
GraphROptions graphROptions = new GraphROptions(statRow[7]);
StatType myStatType = new StatType(
statRow[0], //statisticType
subType,
statRow[2], //statisticApplyTo,
treeviewFake,
sendSelectedSessions,
3, //prefsDigitsNumber, don't care, it's a graph
showSex,
statsJumpsType,
limit,
report.heightPreferred,
report.weightStatsPercent,
arrayListMarkedRows,
rj_evolution_mark_consecutives,
graphROptions,
true, //graph
false //always false in this class
);
myStatType.ChooseStat();
}
}
}
private void on_button_add_comment_clicked (object o, EventArgs args) {
new DialogMessage(Constants.MessageTypes.INFO, "not implemented yet");
}
private void on_button_delete_clicked (object o, EventArgs args) {
if(selected)
{
TreeModel model;
......@@ -332,25 +390,27 @@ public class ReportWindow {
iterOk = store.IterNext (ref myIter);
}
if (iterOk) {
arrayToRecord.Add (
(string) treeview1.Model.GetValue (myIter, 0) + "\t" + //type
(string) treeview1.Model.GetValue (myIter, 1) + "\t" + //subtype
(string) treeview1.Model.GetValue (myIter, 2) + "\t" + //apply to
(string) treeview1.Model.GetValue (myIter, 3) + "\t" + //sessionString
(string) treeview1.Model.GetValue (myIter, 4) + "\t" + //showJumps
(string) treeview1.Model.GetValue (myIter, 5) + "\t" + //showSex
(string) treeview1.Model.GetValue (myIter, 6) + "\t" + //markedRowsString
(string) treeview1.Model.GetValue (myIter, 7) //GraphROptions
);
}
if (iterOk)
arrayToRecord.Add (getRow(myIter));
}
report.StatisticsData = arrayToRecord;
}
private string getRow(TreeIter myIter) {
return (string) treeview1.Model.GetValue (myIter, 0) + "\t" + //type
(string) treeview1.Model.GetValue (myIter, 1) + "\t" + //subtype
(string) treeview1.Model.GetValue (myIter, 2) + "\t" + //apply to
(string) treeview1.Model.GetValue (myIter, 3) + "\t" + //sessionString
(string) treeview1.Model.GetValue (myIter, 4) + "\t" + //showJumps
(string) treeview1.Model.GetValue (myIter, 5) + "\t" + //showSex
(string) treeview1.Model.GetValue (myIter, 6) + "\t" + //markedRowsString
(string) treeview1.Model.GetValue (myIter, 7) //GraphROptions
;
}
protected virtual void on_button_close_clicked (object o, EventArgs args)
private void on_button_close_clicked (object o, EventArgs args)
{
recordData();
......@@ -358,7 +418,7 @@ public class ReportWindow {
//ReportWindowBox = null;
}
protected virtual void on_delete_event (object o, DeleteEventArgs args)
private void on_delete_event (object o, DeleteEventArgs args)
{
recordData();
......@@ -366,7 +426,7 @@ public class ReportWindow {
ReportWindowBox = null;
}
protected virtual void on_button_make_report_clicked (object o, EventArgs args)
private void on_button_make_report_clicked (object o, EventArgs args)
{
recordData();
......
......@@ -1168,7 +1168,6 @@ public class StatsWindow {
reportWin = ReportWindow.Show(parent, report);
//add current stat
reportWin.Add(statisticType, statisticSubType, statisticApplyTo,
//sessionsAsAString, statsShowJumps, showSex.ToString());
sendSelectedSessions, statsShowJumps, showSex.ToString(),
myStatType.MarkedRows, fillGraphROptions());
......
......@@ -301,64 +301,75 @@ public class Report : ExportSession
writer.WriteLine( "<br>" );
}
}
public ArrayList GetSelectedSessions(string sessionsString) {
ArrayList sendSelectedSessions = new ArrayList(1);
string [] sessionsStrFull = sessionsString.Split(new char[] {':'});
for (int j=0; j < sessionsStrFull.Length ; j++) {
Session tempSession = SqliteSession.Select(sessionsStrFull[j]);
sendSelectedSessions.Add(tempSession.UniqueID + ":" + tempSession.Name + ":" + tempSession.DateShort);
}
return sendSelectedSessions;
}
public int GetStatsJumpTypeAndLimit(string str, out int limit) {
int jumpsType = 0;
limit = -1;
string [] strJumpsType = str.ToString().Split(new char[] {'.'});
if(strJumpsType[0] == Catalog.GetString("All"))
jumpsType = 0;
else if(strJumpsType[0] == Catalog.GetString("Limit")) {
jumpsType = 1;
limit = Convert.ToInt32 ( strJumpsType[1] );
} else if(strJumpsType[0] == Catalog.GetString("Jumper's best")) {
jumpsType = 2;
limit = Convert.ToInt32 ( strJumpsType[1] );
} else if(strJumpsType[0] == Catalog.GetString("Jumper's average"))
jumpsType = 3;
return jumpsType;
}
public int GetRjEvolutionMarkConsecutives(string strIni, out string strEnd) {
strEnd = strIni;
int rj_evolution_mark_consecutives = -1;
if(strEnd.StartsWith(Catalog.GetString("Evolution."))) {
string [] strEvo = strEnd.Split(new char[] {'.'});
strEnd = strEvo[0];
rj_evolution_mark_consecutives = Convert.ToInt32(strEvo[1]);
}
return rj_evolution_mark_consecutives;
}
protected void printStats()
{
if(StatisticsData.Count > 0)
writer.WriteLine("<h2>Statitistics</h2>");
writer.WriteLine("<h2>Statistics</h2>");
//obtain every report stats one by one
for(int i=0; i < StatisticsData.Count ; i++) {
//string [] strFull = StatisticsData[i].ToString().Split(new char[] {'\n'});
string [] strFull = StatisticsData[i].ToString().Split(new char[] {'\t'});
string myHeaderStat = "";
//separate in sessions
ArrayList sendSelectedSessions = new ArrayList(1);
string [] sessionsStrFull = strFull[3].Split(new char[] {':'});
for (int j=0; j < sessionsStrFull.Length ; j++) {
Session tempSession = SqliteSession.Select(sessionsStrFull[j]);
sendSelectedSessions.Add(tempSession.UniqueID + ":" + tempSession.Name + ":" + tempSession.DateShort);
}
ArrayList sendSelectedSessions = GetSelectedSessions(strFull[3]);
//separate in markedRows
ArrayList arrayListMarkedRows = new ArrayList(1);
string [] markedStrFull = strFull[6].Split(new char[] {':'});
for (int j=0; j < markedStrFull.Length ; j++) {
arrayListMarkedRows.Add(markedStrFull[j]);