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

0.8.3.2

multiChronopic:
-controls changed
-RunAnalysis now in multiChronopic treeview
-if changed to simulated, disconnected all serial ports
-info included in sessionLoad
-info included in showAllPersonEvents

-eventExecuteWin
+4 cps are graphed (untested)
+shown "cp1", "cp2", ...
+eventExecuteWin, when a cp has event, painted discont lines for rest of cps
+sync message done
+done update

-treeview
+done treeview add
+shown only needed cols (depending on num cps on db at that session, also manages ok Add with != cps)
+unselectable users on treeview mc
+show treeview mc first line
+done edit, delete, showHideActionButtons,
+sqlite update, sqlite delete
+zoom done

optimization on treeview run interval loading of data with variableDistancesString (less SQL calls)

created gui/multiChronopic.cs
parent 8b6eb317
......@@ -33,7 +33,7 @@ CHRONOJUMP_SERVER = chronojump_server
#--------Dependences of CHRONOJUMP
CHRONOJUMP_DEP_GUI = src/gui/chronojump.cs src/gui/confirm.cs src/gui/error.cs src/gui/eventExecute.cs src/gui/eventGraphConfigure.cs src/gui/event.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/reactionTime.cs src/gui/pulse.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs src/gui/report.cs src/gui/about.cs src/gui/helpPorts.cs src/gui/dialogMessage.cs src/gui/dialogCalendar.cs src/gui/dialogImageTest.cs src/gui/language.cs src/gui/repetitiveConditions.cs src/gui/chronopicConnection.cs src/gui/convertWeight.cs src/gui/genericWindow.cs src/gui/splash.cs src/gui/server.cs src/gui/dialogServerStats.cs src/gui/evaluator.cs
CHRONOJUMP_DEP_GUI = src/gui/chronojump.cs src/gui/confirm.cs src/gui/error.cs src/gui/eventExecute.cs src/gui/eventGraphConfigure.cs src/gui/event.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/reactionTime.cs src/gui/pulse.cs src/gui/multiChronopic.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs src/gui/report.cs src/gui/about.cs src/gui/helpPorts.cs src/gui/dialogMessage.cs src/gui/dialogCalendar.cs src/gui/dialogImageTest.cs src/gui/language.cs src/gui/repetitiveConditions.cs src/gui/chronopicConnection.cs src/gui/convertWeight.cs src/gui/genericWindow.cs src/gui/splash.cs src/gui/server.cs src/gui/dialogServerStats.cs src/gui/evaluator.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 src/stats/potency.cs src/stats/rjAVGSD.cs
......@@ -116,7 +116,7 @@ CHRONOJUMP_MINI_DEP = src/chronojump_mini.cs src/chronopic.cs src/util.cs src/lo
#--------Dependences of CHRONOJUMP_SERVER
CHRONOJUMP_SERVER_DEP = chronojump_server/chronojumpServerCSharp.cs src/sqlite/*.cs src/util.cs src/person.cs src/event.cs src/jump.cs src/run.cs src/pulse.cs src/reactionTime.cs src/session.cs src/eventType.cs src/jumpType.cs src/runType.cs src/pulseType.cs src/sport.cs src/constants.cs src/log.cs src/serverPing.cs src/serverEvaluator.cs chronojump_server/BCrypt.cs
CHRONOJUMP_SERVER_DEP = chronojump_server/chronojumpServerCSharp.cs src/sqlite/*.cs src/util.cs src/person.cs src/event.cs src/jump.cs src/run.cs src/pulse.cs src/reactionTime.cs src/multiChronopic.cs src/session.cs src/eventType.cs src/jumpType.cs src/runType.cs src/pulseType.cs src/sport.cs src/constants.cs src/log.cs src/serverPing.cs src/serverEvaluator.cs chronojump_server/BCrypt.cs
#--------Makefiles
......
TODO:
fix two bugs:
fix two bugs (really difficult to reproduce):
1.- the chronojump.cs findVersion (just do more tests check that the error is fixed easily)
2.- the sqlite problem with the thread at start... need to explore more
multiChronopic:
-on creation of array, clean the possible ':'
-treeview: show only needed cp cols (the arrayDone on multiChronopic construction should be different if cp num found changed,
let's do a sqlite first to search if there are cp1, cp2, cp3, cp4, and create an int like cp1*0 + cp1*1 + cp1*2 + cp1*3
if int is the same, then arrayDone will be true)
-treeview: after the load, do the "Add"
-repair
-tempTable
-export
new multichronopic tests:
- optionally do that first time (waiting time) is now shown to anyone
- padu runAnalysis (2cp)
-do button enter
- padu runAnalysis (2cp): out of jumpRj and going to multichronopic (also in menu)
- discrimitative reaction time with two lights and two fotocells (or platforms)
(4cp) when evaluator push left or right button, cp 1 or cp2 lights, person has to cross fotocell a or b (connected to cp 3, 4)
better with only two chronopics, if evaluator push cp1, light1 gets on and person has tocross fotocell1 (or platform). Then with two we have all.
......@@ -25,6 +20,8 @@ we can also have three or four to have more discriminative
Add Cabedo's tests (not prioritary)
server: study possible locks, see sqlite book
add a link to the server page. Develop web stats and survey on web site. Maybe
done by R script and calling to database
http://cran.r-project.org/web/packages/RSQLite/index.html
......@@ -60,31 +57,6 @@ fo it as to chrons. Record some stat data in another file
just to know how xsp2 is working
count time(s) cp change diff same cp diff all cp
1 10 1 IN 10 10
2 15 2 IN 15 5
3 20 1 OUT 10 5
3 20 3 IN 20 0
4 25 2 OUT 10 5
5 30 3 OUT 10 5
6 60 1 IN 40 30
7 65 2 IN 40 5
8 70 3 IN 40 5
do like this:
state time change time IN-IN time OUT-OUT
count time(s) cp1 cp2 cp3 cp1 cp2 cp3 cp1 cp2 cp3 cp1 cp2 cp3
0 0 OUT OUT OUT
1 10 IN 10
2 15 IN 15
3 20 OUT IN 10 20 20
4 25 OUT 10 25
5 30 OUT 10 30
6 60 IN 40 50
7 65 IN 40 50
8 70 IN 40 50
merge databases
......
CHANGELOG.txt
28 apr 2009
0.8.3.2
multiChronopic:
-controls changed
-RunAnalysis now in multiChronopic treeview
-if changed to simulated, disconnected all serial ports
-info included in sessionLoad
-info included in showAllPersonEvents
-eventExecuteWin
+4 cps are graphed (untested)
+shown "cp1", "cp2", ...
+eventExecuteWin, when a cp has event, painted discont lines for rest of cps
+sync message done
+done update
-treeview
+done treeview add
+shown only needed cols (depending on num cps on db at that session, also manages ok Add with != cps)
+unselectable users on treeview mc
+show treeview mc first line
+done edit, delete, showHideActionButtons,
+sqlite update, sqlite delete
+zoom done
optimization on treeview run interval loading of data with variableDistancesString (less SQL calls)
created gui/multiChronopic.cs
24 apr 2009
0.8.3.1
multiChronopic
......@@ -110,6 +139,33 @@ CHANGELOG.txt
created src/sqlite/multiChronopic.cs
created src/treeViewMultiChronopic.cs
multiChronopic explanation
count time(s) cp change diff same cp diff all cp
1 10 1 IN 10 10
2 15 2 IN 15 5
3 20 1 OUT 10 5
3 20 3 IN 20 0
4 25 2 OUT 10 5
5 30 3 OUT 10 5
6 60 1 IN 40 30
7 65 2 IN 40 5
8 70 3 IN 40 5
do like this:
state time change time IN-IN time OUT-OUT
count time(s) cp1 cp2 cp3 cp1 cp2 cp3 cp1 cp2 cp3 cp1 cp2 cp3
0 0 OUT OUT OUT
1 10 IN 10
2 15 IN 15
3 20 OUT IN 10 20 20
4 25 OUT 10 25
5 30 OUT 10 30
6 60 IN 40 50
7 65 IN 40 50
8 70 IN 40 50
Fixed contants chronopic3 name (mistake on last svn ci)
19 mar 2009
......
This diff is collapsed.
......@@ -55,6 +55,9 @@ public class EventExecute
JUMP, JUMPREACTIVE, RUN, RUNINTERVAL, PULSE, REACTIONTIME, MULTICHRONOPIC
}
protected eventType needUpdateGraphType;
protected string syncMessage;
protected bool needShowSyncMessage;
//instances with the info to create
protected PrepareEventGraphJumpSimple prepareEventGraphJumpSimple;
......@@ -274,6 +277,12 @@ public class EventExecute
needSensitiveButtonFinish = false;
}
if(needShowSyncMessage) {
eventExecuteWin.ShowSyncMessage(syncMessage);
needShowSyncMessage = false;
}
//check if it should finish by time
if(shouldFinishByTime()) {
finish = true;
......@@ -387,7 +396,7 @@ public class EventExecute
case eventType.MULTICHRONOPIC:
Log.Write("update graph: MULTICHRONOPIC");
eventExecuteWin.PrepareMultiChronopicGraph(
prepareEventGraphMultiChronopic.timestamp,
//prepareEventGraphMultiChronopic.timestamp,
prepareEventGraphMultiChronopic.cp1StartedIn,
prepareEventGraphMultiChronopic.cp2StartedIn,
prepareEventGraphMultiChronopic.cp3StartedIn,
......
......@@ -65,6 +65,9 @@ public class MultiChronopicExecute : EventExecute
static bool firstValue;
private MultiChronopic multiChronopicDone;
public MultiChronopicExecute() {
}
......@@ -151,6 +154,18 @@ public class MultiChronopicExecute : EventExecute
private void initValues() {
fakeButtonFinished = new Gtk.Button();
simulated = false;
cp1InStr = "";
cp1OutStr = "";
cp2InStr = "";
cp2OutStr = "";
cp3InStr = "";
cp3OutStr = "";
cp4InStr = "";
cp4OutStr = "";
//initialize eventDone as a mc
eventDone = new MultiChronopic();
}
public override void SimulateInitValues(Random randSent)
......@@ -290,8 +305,11 @@ public class MultiChronopicExecute : EventExecute
inStr = ""; outStr = "";
syncStates syncing = syncStates.DONE;
if(syncFirst)
if(syncFirst) {
syncing = syncStates.NOTHING;
syncMessage = Catalog.GetString("Press Test button in all Chronopics simultaneously.");
needShowSyncMessage = true;
}
do {
ok = myCP.Read_event(out timestamp, out myPS);
......@@ -311,10 +329,16 @@ public class MultiChronopicExecute : EventExecute
initializeTimer(); //this is for first Chronopic and only for simulated
}
if(syncing == syncStates.NOTHING && myPS == Chronopic.Plataforma.ON && myLS == States.OFF)
if(syncing == syncStates.NOTHING && myPS == Chronopic.Plataforma.ON && myLS == States.OFF) {
syncing = syncStates.CONTACTED;
else if (syncing == syncStates.CONTACTED && myPS == Chronopic.Plataforma.OFF && myLS == States.ON)
syncMessage = Catalog.GetString("Release Test button in all Chronopics simultaneously.");
needShowSyncMessage = true;
}
else if (syncing == syncStates.CONTACTED && myPS == Chronopic.Plataforma.OFF && myLS == States.ON) {
syncing = syncStates.DONE;
syncMessage = Catalog.GetString("Synchronization done.");
needShowSyncMessage = true;
}
else {
needSensitiveButtonFinish = true;
......@@ -331,7 +355,8 @@ public class MultiChronopicExecute : EventExecute
inEqual = "=";
}
prepareEventGraphMultiChronopic = new PrepareEventGraphMultiChronopic(timestamp/1000.0,
prepareEventGraphMultiChronopic = new PrepareEventGraphMultiChronopic(
//timestamp/1000.0,
cp1StartedIn, cp2StartedIn, cp3StartedIn, cp4StartedIn,
cp1InStr, cp1OutStr, cp2InStr, cp2OutStr, cp3InStr, cp3OutStr, cp4InStr, cp4OutStr);
needUpdateGraphType = eventType.MULTICHRONOPIC;
......
......@@ -63,7 +63,7 @@ public class ReactionTimeExecute : EventExecute
needUpdateGraph = false;
//initialize eventDone as a ReactionTime
//initialize eventDone as a ReactionTime
eventDone = new ReactionTime();
//updateProgressBar = new UpdateProgressBar();
......
This diff is collapsed.
......@@ -83,6 +83,7 @@ public class EditEventWindow
protected string entryWeight = "0"; //used to record the % for old person if we change it
protected string entryAngle = "0";
protected bool showType;
protected bool showTv;
protected bool showTc;
protected bool showFall;
......@@ -94,6 +95,7 @@ public class EditEventWindow
protected bool showAngle;
protected string eventBigTypeString = "a test";
protected bool headerShowDecimal = true;
protected int oldPersonID; //used to record the % for old person if we change it
......@@ -127,6 +129,7 @@ public class EditEventWindow
}
protected virtual void initializeValues () {
showType = true;
showTv = true;
showTc = true;
showFall = true;
......@@ -219,6 +222,11 @@ public class EditEventWindow
entry_description.Text = Util.RemoveNewLine(temp);
createComboEventType(myEvent);
if(! showType) {
label_type_title.Hide();
combo_eventType.Hide();
}
string [] persons = SqlitePersonSession.SelectCurrentSession(myEvent.SessionID, true, false); //onlyIDAndName, not reversed
combo_persons = ComboBox.NewText();
......@@ -236,7 +244,9 @@ public class EditEventWindow
System.Globalization.NumberFormatInfo localeInfo = new System.Globalization.NumberFormatInfo();
localeInfo = System.Globalization.NumberFormatInfo.CurrentInfo;
label_header.Text = string.Format(Catalog.GetString("Use this window to edit a {0}.\n(decimal separator: '{1}')"), eventBigTypeString, localeInfo.NumberDecimalSeparator);
label_header.Text = string.Format(Catalog.GetString("Use this window to edit a {0}."), eventBigTypeString);
if(headerShowDecimal)
label_header.Text += string.Format(Catalog.GetString("\n(decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
}
......
......@@ -42,6 +42,7 @@ public class EventExecuteWindow
[Widget] Gtk.Label label_simulated;
[Widget] Gtk.Image image_simulated_l;
[Widget] Gtk.Image image_simulated_r;
[Widget] Gtk.Label label_sync_message;
[Widget] Gtk.ProgressBar progressbar_event;
[Widget] Gtk.ProgressBar progressbar_time;
......@@ -445,6 +446,10 @@ public class EventExecuteWindow
public void ButtonFinishMakeSensitive() {
button_finish.Sensitive = true;
}
public void ShowSyncMessage(string str) {
label_sync_message.Text = str;
}
private void clearProgressBars()
{
......@@ -913,7 +918,8 @@ public class EventExecuteWindow
}
// multi chronopic
public void PrepareMultiChronopicGraph(double timestamp,
public void PrepareMultiChronopicGraph(
//double timestamp,
bool cp1StartedIn, bool cp2StartedIn, bool cp3StartedIn, bool cp4StartedIn,
string cp1InStr, string cp1OutStr, string cp2InStr, string cp2OutStr,
string cp3InStr, string cp3OutStr, string cp4InStr, string cp4OutStr) {
......@@ -926,12 +932,16 @@ public class EventExecuteWindow
double maxValue = 0;
int topMargin = 10;
//if max value of graph is automatic
/*
if(eventGraphConfigureWin.Max == -1)
maxValue = timestamp; //TODO: delete this, is not used here
//maxValue = timestamp; //TODO: delete this, is not used here
else {
maxValue = eventGraphConfigureWin.Max; //TODO
//maxValue = eventGraphConfigureWin.Max; //TODO
topMargin = 0;
}
*/
if(eventGraphConfigureWin.Max != -1)
topMargin = 0;
//search MIN
double minValue = 1000;
......@@ -950,7 +960,8 @@ public class EventExecuteWindow
*/
//paint graph
paintMultiChronopic (drawingarea, timestamp,
paintMultiChronopic (drawingarea,
//timestamp,
cp1StartedIn, cp2StartedIn, cp3StartedIn, cp4StartedIn,
cp1InStr, cp1OutStr, cp2InStr, cp2OutStr, cp3InStr, cp3OutStr, cp4InStr, cp4OutStr,
maxValue, minValue, topMargin, bottomMargin);
......@@ -1467,8 +1478,14 @@ public class EventExecuteWindow
return ( ancho * ( (timeOld + time) / timeTotal) ) -rightMargin;
}
int yCp1Out = 20;
int yCp2Out = 90;
int yCp3Out = 160;
int yCp4Out = 230;
//TODO: fix this method
private void paintMultiChronopic (Gtk.DrawingArea drawingarea, double timestamp,
private void paintMultiChronopic (Gtk.DrawingArea drawingarea,
//double timestamp,
bool cp1StartedIn, bool cp2StartedIn, bool cp3StartedIn, bool cp4StartedIn,
string cp1InStr, string cp1OutStr, string cp2InStr, string cp2OutStr,
string cp3InStr, string cp3OutStr, string cp4InStr, string cp4OutStr,
......@@ -1501,14 +1518,16 @@ public class EventExecuteWindow
erasePaint(drawingarea);
//writeMarginsText(maxValue, minValue, alto);
writeCpNames();
//check now here that we will have not division by zero problems
if(maxValue - minValue <= 0)
return;
//if(maxValue - minValue <= 0)
// return;
paintMultiChronopic2 (ancho, cp1StartedIn, cp1InStr, cp1OutStr, timeTotal, 30,20);
paintMultiChronopic2 (ancho, cp2StartedIn, cp2InStr, cp2OutStr, timeTotal, 100,90);
paintMultiChronopic2 (ancho, cp3StartedIn, cp3InStr, cp3OutStr, timeTotal, 170,180);
paintMultiChronopic2 (ancho, cp1StartedIn, cp1InStr, cp1OutStr, timeTotal, yCp1Out +10, yCp1Out);
paintMultiChronopic2 (ancho, cp2StartedIn, cp2InStr, cp2OutStr, timeTotal, yCp2Out +10, yCp2Out);
paintMultiChronopic2 (ancho, cp3StartedIn, cp3InStr, cp3OutStr, timeTotal, yCp3Out +10, yCp3Out);
paintMultiChronopic2 (ancho, cp4StartedIn, cp4InStr, cp4OutStr, timeTotal, yCp4Out +10, yCp4Out);
graphProgress = phasesGraph.DONE;
}
......@@ -1523,6 +1542,8 @@ public class EventExecuteWindow
int heightEnd;
Gdk.GC penStart;
Gdk.GC penEnd;
Gdk.GC penStartDiscont;
Gdk.GC penEndDiscont;
string [] cpStart;
string [] cpEnd;
......@@ -1531,6 +1552,8 @@ public class EventExecuteWindow
cpEnd = cpOutStr.Split(new char[] {'='});
penStart = pen_rojo;
penEnd = pen_azul;
penStartDiscont = pen_rojo_discont;
penEndDiscont = pen_azul_discont;
heightStart = h1;
heightEnd = h2;
}
......@@ -1539,25 +1562,25 @@ public class EventExecuteWindow
cpEnd = cpInStr.Split(new char[] {'='});
penStart = pen_azul;
penEnd = pen_rojo;
penStartDiscont = pen_azul_discont;
penEndDiscont = pen_rojo_discont;
heightStart = h2;
heightEnd = h1;
}
ticks = cpStart.Length;
double timeOld = 0;
double xOld = 0;
bool lastCpIsStart = true;
Console.WriteLine("\n(A) cpInStr:*{0}*, cpOutStr:*{1}*", cpInStr, cpOutStr);
/*
int maxTcTfs = 10; if(cp1_i.Length > maxTcTfs) cp1_i = Util.DeleteFirstStrings(cp1_i, maxTcTfs); if(cp1_o.Length > maxTcTfs) cp1_o = Util.DeleteFirstStrings(cp1_o, maxTcTfs); cp1InStr = Util.StringArrayToString(cp1_i, "="); cp1OutStr = Util.StringArrayToString(cp1_o, "="); Console.WriteLine("(B) cp1InStr:*{0}*, cp1OutStr:*{1}*", cp1InStr, cp1OutStr);
*/
for(int i=0; i < ticks; i++) {
if(cpStart.Length > i) {
double x = multiChronopicGetX(ancho, Convert.ToDouble(cpStart[i]), timeOld, timeTotal);
pixmap.DrawLine(penStart, Convert.ToInt32(xOld), heightStart, Convert.ToInt32(x), heightStart);
timeOld += Convert.ToDouble(cpStart[i]);
xOld = x;
lastCpIsStart = true;
}
if(cpEnd.Length > i) {
......@@ -1565,8 +1588,21 @@ public class EventExecuteWindow
pixmap.DrawLine(penEnd, Convert.ToInt32(xOld), heightEnd, Convert.ToInt32(x), heightEnd);
timeOld += Convert.ToDouble(cpEnd[i]);
xOld = x;
lastCpIsStart = false;
}
}
/*
the chronopic that received last event, it's painted and arrives at right end of graph
following code allows to paint line also on other chronopics
in order to show all updated four cps after any cp change
*/
if(timeOld < timeTotal) { //this cp didn't received last event
if(lastCpIsStart)
pixmap.DrawLine(penStartDiscont, Convert.ToInt32(xOld), heightStart, Convert.ToInt32(ancho-rightMargin), heightStart);
else
pixmap.DrawLine(penEndDiscont, Convert.ToInt32(xOld), heightEnd, Convert.ToInt32(ancho-rightMargin), heightEnd);
}
}
......@@ -1614,6 +1650,16 @@ public class EventExecuteWindow
//and text goes down from the baseline, and will not be seen
}
private void writeCpNames() {
layout.SetMarkup("cp1");
pixmap.DrawLayout (pen_gris, 0, yCp1Out -20, layout);
layout.SetMarkup("cp2");
pixmap.DrawLayout (pen_gris, 0, yCp2Out -20, layout);
layout.SetMarkup("cp3");
pixmap.DrawLayout (pen_gris, 0, yCp3Out -20, layout);
layout.SetMarkup("cp4");
pixmap.DrawLayout (pen_gris, 0, yCp4Out -20, layout);
}
private void hideButtons() {
button_cancel.Sensitive = false;
......
......@@ -80,6 +80,7 @@ public class EditJumpWindow : EditEventWindow
}
protected override void initializeValues () {
showType = true;
showTv = true;
showTc= true;
showFall = true;
......@@ -302,6 +303,7 @@ public class EditJumpRjWindow : EditJumpWindow
}
protected override void initializeValues () {
showType = true;
showTv = false;
showTc = false;
showFall = true;
......@@ -813,7 +815,8 @@ public class JumpExtraWindow
if (JumpExtraWindowBox == null) {
JumpExtraWindowBox = new JumpExtraWindow (parent);
}
/*
if(myJumpType.Name == Constants.RunAnalysisName) {
hideRepetitiveData();
hideWeightData();
......@@ -830,6 +833,7 @@ public class JumpExtraWindow
return JumpExtraWindowBox;
}
*/
if(myJumpType.IsRepetitive) {
string jumpsName = Catalog.GetString("jumps");
......
/*
* This file is part of ChronoJump
*
* ChronoJump 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.
*
* ChronoJump 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
*
* Xavier de Blas:
*/
using System;
using Gtk;
using Glade;
using System.Text; //StringBuilder
using System.Collections; //ArrayList
using System.Threading;
using Mono.Unix;
//--------------------------------------------------------
//---------------- EDIT MULTI CHRONOPIC WIDGET -----------
//--------------------------------------------------------
public class EditMultiChronopicWindow : EditEventWindow
{
static EditMultiChronopicWindow EditMultiChronopicWindowBox;
EditMultiChronopicWindow (Gtk.Window parent) {
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "edit_event", null);
gladeXML.Autoconnect(this);
this.parent = parent;
//put an icon to window
UtilGtk.IconWindow(edit_event);
eventBigTypeString = Catalog.GetString("multi chronopic");
headerShowDecimal = false;
}
static new public EditMultiChronopicWindow Show (Gtk.Window parent, Event myEvent, int pDN)
{
if (EditMultiChronopicWindowBox == null) {
EditMultiChronopicWindowBox = new EditMultiChronopicWindow (parent);
}
EditMultiChronopicWindowBox.pDN = pDN;
EditMultiChronopicWindowBox.initializeValues();
EditMultiChronopicWindowBox.fillDialog (myEvent);
EditMultiChronopicWindowBox.edit_event.Show ();
return EditMultiChronopicWindowBox;
}
protected override void initializeValues () {
headerShowDecimal = false;
showType = false;
showTv = false;
showTc= false;
showFall = false;
showDistance = false;
showTime = false;
showSpeed = false;
showWeight = false;
showLimited = false;
}
protected override void updateEvent(int eventID, int personID, string description) {
SqliteMultiChronopic.Update(eventID, personID, description);
}
protected override void on_button_cancel_clicked (object o, EventArgs args)
{
EditMultiChronopicWindowBox.edit_event.Hide();
EditMultiChronopicWindowBox = null;
}
protected override void on_delete_event (object o, DeleteEventArgs args)
{
EditMultiChronopicWindowBox.edit_event.Hide();
EditMultiChronopicWindowBox = null;
}
protected override void hideWindow() {
EditMultiChronopicWindowBox.edit_event.Hide();
EditMultiChronopicWindowBox = null;
}
}
......@@ -1608,7 +1608,7 @@ public class PersonShowAllEventsWindow {
createComboPersons(sessionID, currentPerson.UniqueID.ToString(), currentPerson.Name);
createTreeView(treeview_person_show_all_events);
store = new TreeStore( typeof (string), typeof (string), typeof (string), typeof (string),
typeof (string), typeof(string), typeof(string), typeof(string), typeof(string) );
typeof (string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string) );
treeview_person_show_all_events.Model = store;
fillTreeView(treeview_person_show_all_events,store, currentPerson.UniqueID);
}
......@@ -1653,7 +1653,7 @@ public class PersonShowAllEventsWindow {
string myText = UtilGtk.ComboGetActive(combo_persons);
if(myText != "") {
store = new TreeStore( typeof (string), typeof (string), typeof (string), typeof (string),
typeof (string), typeof(string), typeof(string), typeof(string), typeof(string) );
typeof (string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string) );
treeview_person_show_all_events.Model = store;
string [] myStringFull = myText.Split(new char[] {':'});
......@@ -1675,7 +1675,6 @@ public class PersonShowAllEventsWindow {
protected void createTreeView (Gtk.TreeView tv) {
tv.HeadersVisible=true;
int count = 0;
tv.AppendColumn ( Catalog.GetString ("Session name"), new CellRendererText(), "text", count++);
tv.AppendColumn ( Catalog.GetString ("Place"), new CellRendererText(), "text", count++);
tv.AppendColumn ( Catalog.GetString ("Date\n"), new CellRendererText(), "text", count++);
......@@ -1685,17 +1684,18 @@ public class PersonShowAllEventsWindow {
tv.AppendColumn ( Catalog.GetString ("Runs\ninterval"), new CellRendererText(), "text", count++);
tv.AppendColumn ( Catalog.GetString ("Reaction\ntime"), new CellRendererText(), "text", count++);
tv.AppendColumn ( Catalog.GetString ("Pulses"), new CellRendererText(), "text", count++);
tv.AppendColumn ( Catalog.GetString ("MultiChronopic"), new CellRendererText(), "text", count++);
}
protected void fillTreeView (Gtk.TreeView tv, TreeStore store, int personID) {
ArrayList myEvents;
//myEvents = SqlitePerson.SelectAllPersonEvents(currentPerson.UniqueID);
myEvents = SqlitePerson.SelectAllPersonEvents(personID);
foreach (string myEvent in myEvents) {
string [] myStr = myEvent.Split(new char[] {':'});
store.AppendValues (myStr[0], myStr[1], myStr[2], myStr[3], myStr[4], myStr[5], myStr[6], myStr[7], myStr[8]);
store.AppendValues (myStr[0], myStr[1], myStr[2], myStr[3], myStr[4], myStr[5],
myStr[6], myStr[7], myStr[8], myStr[9]);
}
}
......
......@@ -47,6 +47,7 @@ public class EditPulseWindow : EditEventWindow
UtilGtk.IconWindow(edit_event);
eventBigTypeString = Catalog.GetString("pulse");
headerShowDecimal = false;
}
static new public EditPulseWindow Show (Gtk.Window parent, Event myEvent, int pDN)
......@@ -67,6 +68,7 @@ public class EditPulseWindow : EditEventWindow
}
protected override void initializeValues () {
showType = true;
showTv = false;
showTc= false;
showFall = false;
......
......@@ -69,6 +69,8 @@ public class EditReactionTimeWindow : EditEventWindow
}
protected override void initializeValues () {
headerShowDecimal = false;
showType = false;
showTv = false;
showTc= false;
showFall = false;
......
......@@ -72,6 +72,7 @@ public class EditRunWindow : EditEventWindow
}
protected override void initializeValues () {
showType = true;
showTv = false;
showTc= false;
showFall = false;
......@@ -244,6 +245,7 @@ public class EditRunIntervalWindow : EditRunWindow
}
protected override void initializeValues () {
showType = true;
showTv = false;
showTc= false;
showFall = false;
......
......@@ -667,7 +667,7 @@ public class SessionLoadWindow {
store = new TreeStore(typeof (string), typeof (string), typeof (string), typeof (string),
typeof (string), typeof (string), typeof (string), typeof (string), typeof(string),
typeof (string), typeof (string), typeof (string),
typeof (string), typeof (string), typeof (string) );
typeof (string), typeof (string), typeof (string), typeof(string) );
treeview_session_load.Model = store;
fillTreeView(treeview_session_load,store);
......@@ -704,6 +704,7 @@ public class SessionLoadWindow {