Commit 34b49b60 authored by Xavier de Blas's avatar Xavier de Blas

more code for report:

	1.- new file src/statType.cs (statType class), now gui/stats.cs and report.cs create needed stat and call to prepareData and CreateGraph if needed
	2.- lots of changes in Stat and StatWindow classes
	3.- Stat.CreateGraph can plot into window or to a file (for report)
	4.- added src/stats/report/sjCmjAbk.cs
parent 39f52578
......@@ -19,14 +19,14 @@ MCS = mcs
CHRONOJUMP = chronojump
CHRONOJUMP_DEP_GUI = src/gui/confirm.cs src/gui/error.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs src/gui/report.cs
CHRONOJUMP_DEP_STATS = src/stats/main.cs src/stats/global.cs src/stats/sjCmjAbk.cs src/stats/sjCmjAbkPlus.cs src/stats/djIndex.cs src/stats/djQ.cs src/stats/rjIndex.cs src/stats/rjPotencyBosco.cs src/stats/rjEvolution.cs src/stats/ieIub.cs src/stats/fv.cs
CHRONOJUMP_DEP_STATS = src/statType.cs src/stats/main.cs src/stats/global.cs src/stats/sjCmjAbk.cs src/stats/sjCmjAbkPlus.cs src/stats/djIndex.cs src/stats/djQ.cs src/stats/rjIndex.cs src/stats/rjPotencyBosco.cs src/stats/rjEvolution.cs src/stats/ieIub.cs src/stats/fv.cs
CHRONOJUMP_DEP_GRAPHS = src/stats/graphs/graphData.cs src/stats/graphs/graphSerie.cs src/stats/graphs/global.cs src/stats/graphs/sjCmjAbk.cs src/stats/graphs/sjCmjAbkPlus.cs src/stats/graphs/djIndex.cs src/stats/graphs/djQ.cs src/stats/graphs/rjIndex.cs src/stats/graphs/rjPotencyBosco.cs src/stats/graphs/rjEvolution.cs src/stats/graphs/ieIub.cs src/stats/graphs/fv.cs
CHRONOJUMP_DEP_REPORT = src/stats/report/sjCmjAbk.cs
CHRONOJUMP_DEP_SQLITE = src/sqlite/main.cs src/sqlite/preferences.cs src/sqlite/person.cs src/sqlite/session.cs src/sqlite/jump.cs src/sqlite/jumpType.cs src/sqlite/run.cs src/sqlite/runType.cs src/sqlite/personSession.cs src/sqlite/stat.cs
CHRONOJUMP_DEP = src/chronojump.cs src/person.cs src/jump.cs src/jumpType.cs src/run.cs src/runType.cs src/session.cs src/catalog.cs src/exportSession.cs src/treeViewJump.cs src/treeViewRun.cs src/util.cs src/report.cs $(CHRONOJUMP_DEP_GUI) $(CHRONOJUMP_DEP_STATS) $(CHRONOJUMP_DEP_GRAPHS) $(CHRONOJUMP_DEP_SQLITE)
CHRONOJUMP_DEP = src/chronojump.cs src/person.cs src/jump.cs src/jumpType.cs src/run.cs src/runType.cs src/session.cs src/catalog.cs src/exportSession.cs src/treeViewJump.cs src/treeViewRun.cs src/util.cs src/report.cs $(CHRONOJUMP_DEP_GUI) $(CHRONOJUMP_DEP_STATS) $(CHRONOJUMP_DEP_GRAPHS) $(CHRONOJUMP_DEP_SQLITE) $(CHRONOJUMP_DEP_REPORT)
RESOURCES = -resource:glade/chronojump.glade,chronojump.glade
CHRONOJUMP_LIB = -pkg:gtk-sharp -pkg:gnome-sharp -pkg:glade-sharp -r System.Data -r Mono.Data.SqliteClient
......
CHANGELOG:
16 set 2005
more code for report:
1.- new file src/statType.cs (statType class), now gui/stats.cs and report.cs create needed stat and call to prepareData and CreateGraph if needed
2.- lots of changes in Stat and StatWindow classes
3.- Stat.CreateGraph can plot into window or to a file (for report)
4.- added src/stats/report/sjCmjAbk.cs
9 set 2005
report (doing task 295)
- widget make report done
......
No preview for this file type
......@@ -76,7 +76,7 @@
<signal name="activate" handler="on_open_activate" last_modification_time="Wed, 22 Sep 2004 23:55:11 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1193">
<widget class="GtkImage" id="image1218">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
......@@ -97,7 +97,7 @@
<signal name="activate" handler="on_edit_session_activate" last_modification_time="Tue, 26 Jul 2005 19:12:07 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1194">
<widget class="GtkImage" id="image1219">
<property name="visible">True</property>
<property name="stock">gtk-edit</property>
<property name="icon_size">1</property>
......@@ -119,7 +119,7 @@
<signal name="activate" handler="on_delete_session_activate" last_modification_time="Thu, 28 Jul 2005 13:37:42 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1195">
<widget class="GtkImage" id="image1220">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
......@@ -146,7 +146,7 @@
<signal name="activate" handler="on_export_session_activate" last_modification_time="Sat, 12 Feb 2005 21:57:07 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1196">
<widget class="GtkImage" id="image1221">
<property name="visible">True</property>
<property name="stock">gtk-convert</property>
<property name="icon_size">1</property>
......@@ -217,7 +217,7 @@
<signal name="activate" handler="on_person_add_single_activate" last_modification_time="Thu, 18 Aug 2005 23:07:39 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1197">
<widget class="GtkImage" id="image1222">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
......@@ -238,7 +238,7 @@
<signal name="activate" handler="on_person_add_multiple_activate" last_modification_time="Thu, 18 Aug 2005 23:01:23 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1198">
<widget class="GtkImage" id="image1223">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
......@@ -265,7 +265,7 @@
<signal name="activate" handler="on_recuperate_person_activate" last_modification_time="Sun, 12 Dec 2004 00:40:31 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1199">
<widget class="GtkImage" id="image1224">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
......@@ -286,7 +286,7 @@
<signal name="activate" handler="on_recuperate_persons_from_session_activate" last_modification_time="Tue, 26 Jul 2005 19:12:07 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1200">
<widget class="GtkImage" id="image1225">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
......@@ -313,7 +313,7 @@
<signal name="activate" handler="on_edit_current_person_clicked" last_modification_time="Sun, 17 Oct 2004 11:43:33 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1201">
<widget class="GtkImage" id="image1226">
<property name="visible">True</property>
<property name="stock">gtk-justify-fill</property>
<property name="icon_size">1</property>
......@@ -334,7 +334,7 @@
<signal name="activate" handler="on_show_all_person_events_activate" last_modification_time="Mon, 29 Aug 2005 09:51:24 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1202">
<widget class="GtkImage" id="image1227">
<property name="visible">True</property>
<property name="stock">gtk-index</property>
<property name="icon_size">1</property>
......@@ -361,7 +361,7 @@
<signal name="activate" handler="on_delete_current_person_from_session_activate" last_modification_time="Thu, 28 Jul 2005 15:49:38 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1203">
<widget class="GtkImage" id="image1228">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
......@@ -449,7 +449,7 @@
<signal name="activate" handler="on_button_more_clicked" last_modification_time="Thu, 10 Mar 2005 18:52:25 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1204">
<widget class="GtkImage" id="image1229">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
......@@ -474,7 +474,7 @@
<signal name="activate" handler="on_edit_selected_jump_clicked" last_modification_time="Sun, 17 Oct 2004 11:47:42 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1205">
<widget class="GtkImage" id="image1230">
<property name="visible">True</property>
<property name="stock">gtk-justify-fill</property>
<property name="icon_size">1</property>
......@@ -495,7 +495,7 @@
<signal name="activate" handler="on_delete_selected_jump_clicked" last_modification_time="Tue, 19 Oct 2004 11:54:17 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1206">
<widget class="GtkImage" id="image1231">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
......@@ -559,7 +559,7 @@
<signal name="activate" handler="on_button_more_rj_clicked" last_modification_time="Fri, 11 Mar 2005 14:45:23 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1207">
<widget class="GtkImage" id="image1232">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
......@@ -584,7 +584,7 @@
<signal name="activate" handler="on_edit_selected_jump_rj_clicked" last_modification_time="Sun, 07 Nov 2004 17:37:37 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1208">
<widget class="GtkImage" id="image1233">
<property name="visible">True</property>
<property name="stock">gtk-justify-fill</property>
<property name="icon_size">1</property>
......@@ -605,7 +605,7 @@
<signal name="activate" handler="on_delete_selected_jump_rj_clicked" last_modification_time="Sun, 07 Nov 2004 17:37:37 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1209">
<widget class="GtkImage" id="image1234">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
......@@ -632,7 +632,7 @@
<signal name="activate" handler="on_jump_type_add_activate" last_modification_time="Thu, 10 Mar 2005 18:52:25 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1210">
<widget class="GtkImage" id="image1235">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
......@@ -738,7 +738,7 @@
<signal name="activate" handler="on_button_run_more_clicked" last_modification_time="Fri, 22 Apr 2005 14:37:06 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1211">
<widget class="GtkImage" id="image1236">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
......@@ -763,7 +763,7 @@
<signal name="activate" handler="on_edit_selected_run_clicked" last_modification_time="Fri, 22 Apr 2005 14:34:58 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1212">
<widget class="GtkImage" id="image1237">
<property name="visible">True</property>
<property name="stock">gtk-justify-fill</property>
<property name="icon_size">1</property>
......@@ -784,7 +784,7 @@
<signal name="activate" handler="on_delete_selected_run_clicked" last_modification_time="Fri, 22 Apr 2005 14:34:58 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1213">
<widget class="GtkImage" id="image1238">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
......@@ -847,7 +847,7 @@
<signal name="activate" handler="on_button_run_interval_more_clicked" last_modification_time="Tue, 16 Aug 2005 01:18:41 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1214">
<widget class="GtkImage" id="image1239">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
......@@ -872,7 +872,7 @@
<signal name="activate" handler="on_edit_selected_run_interval_clicked" last_modification_time="Tue, 16 Aug 2005 12:33:39 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1215">
<widget class="GtkImage" id="image1240">
<property name="visible">True</property>
<property name="stock">gtk-justify-fill</property>
<property name="icon_size">1</property>
......@@ -893,7 +893,7 @@
<signal name="activate" handler="on_delete_selected_run_interval_clicked" last_modification_time="Tue, 16 Aug 2005 12:33:39 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1216">
<widget class="GtkImage" id="image1241">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
......@@ -920,7 +920,7 @@
<signal name="activate" handler="on_run_type_add_activate" last_modification_time="Fri, 22 Apr 2005 14:34:58 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1217">
<widget class="GtkImage" id="image1242">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
......@@ -962,7 +962,7 @@
<signal name="activate" handler="on_show_report_activate" last_modification_time="Tue, 06 Sep 2005 09:10:32 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1218">
<widget class="GtkImage" id="image1243">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property>
......@@ -1003,7 +1003,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Serial Port</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="active">False</property>
<property name="group">menuitem_simulated</property>
<signal name="activate" handler="on_radiobutton_serial_port_activate" last_modification_time="Sat, 08 Jan 2005 05:11:45 GMT"/>
</widget>
......
......@@ -83,16 +83,17 @@ public class ReportWindow {
ReportWindowBox.report_window.Show ();
}
else {
//update all widget only if it's hidden
if(! ReportWindowBox.report_window.Visible)
{
//checkboxes
ReportWindowBox.loadCheckBoxes();
//update all widget only if it's hidden
if(! ReportWindowBox.report_window.Visible)
{
//checkboxes
ReportWindowBox.loadCheckBoxes();
ReportWindowBox.fillTreeView();
ReportWindowBox.fillTreeView();
ReportWindowBox.report_window.Show ();
ReportWindowBox.report_window.Show ();
}
}
return ReportWindowBox;
......@@ -125,7 +126,7 @@ public class ReportWindow {
store.Clear();
for (int i=0; i < report.StatisticsData.Count ; i++) {
string [] myStringFull = report.StatisticsData[i].ToString().Split(new char[] {':'});
string [] myStringFull = report.StatisticsData[i].ToString().Split(new char[] {'\n'});
store.AppendValues (
myStringFull[0], //type
......@@ -140,13 +141,25 @@ public class ReportWindow {
}
//comes from stats window
public void Add(string type, string subtype, string applyTo, string sessionString, string showJumps, string showSex)
//public void Add(string type, string subtype, string applyTo, string sessionString, string showJumps, string showSex)
public void Add(string type, string subtype, string applyTo, ArrayList sendSelectedSessions, string showJumps, string showSex)
{
string sessionsAsAString = "";
for (int i=0; i < sendSelectedSessions.Count ; i++) {
if(i>0) {
//sessionsAsAString += "\n";
sessionsAsAString += ":";
}
string [] myStrFull = sendSelectedSessions[i].ToString().Split(new char[] {':'});
//sessionsAsAString += myStrFull[0] + ":" + myStrFull[1] + ":" + myStrFull[2]; //id, name, date
sessionsAsAString += myStrFull[0];
}
store.AppendValues (
type,
subtype,
applyTo,
sessionString,
sessionsAsAString,
showJumps,
showSex
);
......@@ -259,11 +272,11 @@ public class ReportWindow {
if (iterOk) {
arrayToRecord.Add (
(string) treeview1.Model.GetValue (myIter, 0) + ":" + //type
(string) treeview1.Model.GetValue (myIter, 1) + ":" + //subtype
(string) treeview1.Model.GetValue (myIter, 2) + ":" + //apply to
(string) treeview1.Model.GetValue (myIter, 3) + ":" + //sessionString
(string) treeview1.Model.GetValue (myIter, 4) + ":" + //showJumps
(string) treeview1.Model.GetValue (myIter, 0) + "\n" + //type
(string) treeview1.Model.GetValue (myIter, 1) + "\n" + //subtype
(string) treeview1.Model.GetValue (myIter, 2) + "\n" + //apply to
(string) treeview1.Model.GetValue (myIter, 3) + "\n" + //sessionString
(string) treeview1.Model.GetValue (myIter, 4) + "\n" + //showJumps
(string) treeview1.Model.GetValue (myIter, 5) //showSex
);
}
......
......@@ -72,8 +72,7 @@ public class StatsWindow {
//selected sessions
ArrayList selectedSessions;
//useful for deleting headers of lastStat just before making a new Stat
private Stat myStat;
//private Stat myStat;
private string allJumpsName = Catalog.GetString("All jumps");
......@@ -85,6 +84,7 @@ public class StatsWindow {
Catalog.GetString("Reactive"),
};
//if this changes, change also statType.cs
static string djIndexFormula = Catalog.GetString("Dj Index") + " ((tv-tc)/tc *100)";
static string qIndexFormula = Catalog.GetString("Q index") + " (tv/tc)";
private static string [] comboStatsSubTypeWithTCOptions = {
......@@ -98,6 +98,7 @@ public class StatsWindow {
Catalog.GetString("Evolution")
};
//if this changes, change also statType.cs
static string fvIndexFormula = "F/V sj+(100%)/sj *100";
static string ieIndexFormula = "IE (cmj-sj)/sj *100";
static string iubIndexFormula = "IUB (abk-cmj)/cmj *100";
......@@ -108,6 +109,8 @@ public class StatsWindow {
iubIndexFormula
};
ArrayList sendSelectedSessions;
Report report;
ReportWindow reportWin;
......@@ -128,7 +131,7 @@ public class StatsWindow {
this.report = report;
this.reportWin= reportWin;
myStat = new Stat(); //create and instance of myStat
//myStat = new Stat(); //create and instance of myStat
createComboStatsType();
createComboStatsSubType();
......@@ -306,7 +309,9 @@ public class StatsWindow {
statsRemoveColumns();
}
statsColumnsToRemove = true;
bool toReport = false; //all graphs are down for showing in window (not to file like report.cs)
int statsJumpsType = 0;
int limit = -1;
if (radiobutton_stats_jumps_all.Active) {
......@@ -325,319 +330,45 @@ public class StatsWindow {
//we use sendSelectedSessions for not losing selectedSessions ArrayList
//everytime user cicles the sessions select radiobuttons
ArrayList sendSelectedSessions = new ArrayList(2);
sendSelectedSessions = new ArrayList(2);
if (radiobutton_current_session.Active) {
sendSelectedSessions.Add (currentSession.UniqueID + ":" + currentSession.Name + ":" + currentSession.Date);
} else if (radiobutton_selected_sessions.Active) {
sendSelectedSessions = selectedSessions;
}
StatType myStatType = new StatType(
statisticType,
statisticSubType,
statisticApplyTo,
treeview_stats,
sendSelectedSessions,
prefsDigitsNumber,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
heightPreferred,
weightStatsPercent,
graph,
toReport
);
bool allFine = myStatType.ChooseStat();
if ( statisticType == Catalog.GetString("Global") ) {
int jumperID = -1; //all jumpers
string jumperName = ""; //all jumpers
if(graph) {
myStat = new GraphGlobal(
sendSelectedSessions,
jumperID, jumperName,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType, heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatGlobal(treeview_stats,
sendSelectedSessions,
jumperID, jumperName,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType, heightPreferred
);
myStat.PrepareData();
}
}
else if (statisticType == Catalog.GetString("Jumper"))
{
if(statisticApplyTo.Length == 0) {
Console.WriteLine("Jumper-ret");
return false;
}
int jumperID = Convert.ToInt32(Util.FetchID(statisticApplyTo));
if(jumperID == -1) {
return false;
}
string jumperName = Util.FetchName(statisticApplyTo);
if(graph) {
myStat = new GraphGlobal(
sendSelectedSessions,
jumperID, jumperName,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType, heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
}
else {
myStat = new StatGlobal(treeview_stats,
sendSelectedSessions,
jumperID, jumperName,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType, heightPreferred
);
myStat.PrepareData();
}
}
else if(statisticType == Catalog.GetString("Simple"))
{
if(statisticApplyTo.Length == 0) {
Console.WriteLine("Simple-ret");
return false;
}
if(statisticSubType != Catalog.GetString("No indexes"))
{
string indexType = "";
if(statisticSubType == ieIndexFormula) {
indexType = "IE";
} else if(statisticSubType == iubIndexFormula) {
indexType = "IUB";
} else if(statisticSubType == fvIndexFormula) {
indexType = "F/V";
}
if(indexType == "IE" || indexType == "IUB") {
if(graph) {
myStat = new GraphIeIub (
sendSelectedSessions,
indexType,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatIeIub(treeview_stats,
sendSelectedSessions,
indexType,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
} else { //F/V
if(graph) {
myStat = new GraphFv (
sendSelectedSessions,
indexType,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatFv(treeview_stats,
sendSelectedSessions,
indexType,
prefsDigitsNumber, checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
}
}
else {
JumpType myType = new JumpType(statisticApplyTo);
//manage all weight jumps and the "All jumps" (simple)
if(myType.HasWeight ||
statisticApplyTo == allJumpsName)
{
if(graph) {
myStat = new GraphSjCmjAbkPlus (
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
weightStatsPercent,
heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatSjCmjAbkPlus (treeview_stats,
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
weightStatsPercent,
heightPreferred
);
myStat.PrepareData();
}
} else {
if(graph) {
myStat = new GraphSjCmjAbk (
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatSjCmjAbk (treeview_stats,
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
heightPreferred
);
myStat.PrepareData();
}
}
}
}
else if(statisticType == Catalog.GetString("With TC"))
{
if(statisticApplyTo.Length == 0) {
Console.WriteLine("WithTC-ret");
return false;
}
if(statisticSubType == djIndexFormula)
{
if(graph) {
myStat = new GraphDjIndex (
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit//,
//heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatDjIndex(treeview_stats,
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit//,
//heightPreferred
);
myStat.PrepareData();
}
} else if(statisticSubType == qIndexFormula)
{
if(graph) {
myStat = new GraphDjQ (
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit//,
//heightPreferred
);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatDjQ(treeview_stats,
sendSelectedSessions,
prefsDigitsNumber, statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit//,
//heightPreferred
);
myStat.PrepareData();
}
}
}
else if(statisticType == Catalog.GetString("Reactive")) {
if(statisticSubType == Catalog.GetString("Average Index"))
{
if(graph) {
myStat = new GraphRjIndex (
sendSelectedSessions,
prefsDigitsNumber,
statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatRjIndex(treeview_stats,
sendSelectedSessions,
prefsDigitsNumber,
statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
}
else if(statisticSubType == Catalog.GetString("POTENCY (Bosco)"))
{
if(graph) {
myStat = new GraphRjPotencyBosco (
sendSelectedSessions,
prefsDigitsNumber,
statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatRjPotencyBosco(treeview_stats,
sendSelectedSessions,
prefsDigitsNumber,
statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
}
else if(statisticSubType == Catalog.GetString("Evolution"))
{
if(graph) {
myStat = new GraphRjEvolution (
sendSelectedSessions,
prefsDigitsNumber,
statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
myStat.CreateGraph();
} else {
myStat = new StatRjEvolution(treeview_stats,
sendSelectedSessions,
prefsDigitsNumber,
statisticApplyTo,
checkbutton_stats_sex.Active,
statsJumpsType,
limit);
myStat.PrepareData();
}
}
}
/*
//show enunciate of the stat in textview_enunciate
TextBuffer tb = new TextBuffer (new TextTagTable());
tb.SetText(myStat.ToString());
textview_enunciate.Buffer = tb;
//all was fine
return true;
*/
if(allFine) {
return true;
} else {
return false;
}
}
......@@ -877,16 +608,23 @@ public class StatsWindow {
if(statisticApplyTo.Length == 0) {
statisticApplyTo = "-";
}