chronojump r481 - in trunk: . build/data build/data/locale/ca/LC_MESSAGES build/data/locale/en_GB/LC_MESSAGES build/data/locale/es/LC_MESSAGES glade po src src/execute src/gui src/sqlite web/data web/data/langs/_es/Pages web/html_created_no_edit web/html_created_no_edit/images



Author: xaviblas
Date: Fri Apr  3 14:21:05 2009
New Revision: 481
URL: http://svn.gnome.org/viewvc/chronojump?rev=481&view=rev

Log:
eventExecute graphs bars done for simple events: jump simple, run, reaction time
main window shows in task bar again



Added:
   trunk/web/data/languages_with_de.txt
   trunk/web/html_created_no_edit/images/pulsador1.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/pulsador2.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/pulsador3.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/pulsador4.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting1.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting1_small.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting2_rca.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting2_rca_small.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting3.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting3_small.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting4.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting4_small.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting5.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting5_small.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting6.jpg   (contents, props changed)
   trunk/web/html_created_no_edit/images/velleman_connecting6_small.jpg   (contents, props changed)
Modified:
   trunk/TODO.txt
   trunk/build/data/chronojump.prg
   trunk/build/data/chronojump_mini.prg
   trunk/build/data/locale/ca/LC_MESSAGES/chronojump.mo
   trunk/build/data/locale/en_GB/LC_MESSAGES/chronojump.mo
   trunk/build/data/locale/es/LC_MESSAGES/chronojump.mo
   trunk/changelog.txt
   trunk/glade/chronojump.glade
   trunk/po/ca.po
   trunk/src/execute/multiChronopic.cs
   trunk/src/exportSession.cs
   trunk/src/gui/chronojump.cs
   trunk/src/gui/eventExecute.cs
   trunk/src/report.cs
   trunk/src/server.cs
   trunk/src/sqlite/pulse.cs
   trunk/src/sqlite/reactionTime.cs
   trunk/web/data/langs/_es/Pages/photocells
   trunk/web/html_created_no_edit/photocells_es.html

Modified: trunk/TODO.txt
==============================================================================
--- trunk/TODO.txt	(original)
+++ trunk/TODO.txt	Fri Apr  3 14:21:05 2009
@@ -1,5 +1,8 @@
 TODO: 
 
+fix graph problems on multichronopic (also when there's only a chronopic)
+
+
 mirar fallo al tancar finestra executar fent click a X
 abans o desprÃs de cancelar
 i mirar la minifinestra que surt (de d'acord) que es pugui tancar tambà amb la X
@@ -21,10 +24,6 @@
 -upload evaluator
 -upload session
 
-do the graph of last jump plot values of jumps before
-(maybe show last jumps of this kind on different people, and the avg of this
-user and all users (this two in different color))
-
 http://en.csharp-online.net/ASP.NET_Security_HacksÂAvoiding_SQL_Injection
 http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/
 every string that gets on server or complex object, sanitize it: see on sql or
@@ -47,11 +46,6 @@
 fo it as to chrons. Record some stat data in another file
 just to know how xsp2 is working
 
-in execution graph put avgs as horizontal lines
-and plot all tests of same type of same person
-jump done, need run and reactionTime (maybe also pulse)
-
-eventExecure reactionTimeGraph doesn't plot now because uses paintJumpSimple that has changed
 
 count time(s)  cp change diff same cp diff all cp
 1          10   1     IN           10          10
@@ -77,23 +71,6 @@
 7          65       IN           40           50
 8          70           IN           40           50
 
-doing gui/eventExecute multiChronopic
--do 4 horiz lines that go from left to right
--this 4 lines are updated at every change
--all has to fit in the width of the graph (if impossible, double de width)
--lines are like quadrated waves, are up (if person is out) and down if person
-is at platform)
--each line has a color
-eg:
- cp1:  ----
-           ------
-
- cp2:        -----
-       ------
-
- cp3:      -----  
-       ----     -
-
 
 merge databases
 

Modified: trunk/build/data/chronojump.prg
==============================================================================
Binary files. No diff available.

Modified: trunk/build/data/chronojump_mini.prg
==============================================================================
Binary files. No diff available.

Modified: trunk/build/data/locale/ca/LC_MESSAGES/chronojump.mo
==============================================================================
Binary files. No diff available.

Modified: trunk/build/data/locale/en_GB/LC_MESSAGES/chronojump.mo
==============================================================================
Binary files. No diff available.

Modified: trunk/build/data/locale/es/LC_MESSAGES/chronojump.mo
==============================================================================
Binary files. No diff available.

Modified: trunk/changelog.txt
==============================================================================
--- trunk/changelog.txt	(original)
+++ trunk/changelog.txt	Fri Apr  3 14:21:05 2009
@@ -1,5 +1,9 @@
 CHANGELOG.txt
 
+3 apr 2009
+	eventExecute graphs bars done for simple events: jump simple, run, reaction time
+	main window shows in task bar again
+
 31 mar 2009 (2)
 	multiChronopic shows graph real time for 4 chronopics, 
 	but still some little bugs to fix

Modified: trunk/glade/chronojump.glade
==============================================================================
--- trunk/glade/chronojump.glade	(original)
+++ trunk/glade/chronojump.glade	Fri Apr  3 14:21:05 2009
@@ -8450,7 +8450,7 @@
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
   <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_taskbar_hint">False</property>
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
@@ -15733,34 +15733,6 @@
 			  <property name="spacing">0</property>
 
 			  <child>
-			    <widget class="GtkButton" id="button_zoom">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Update</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_zoom_clicked" last_modification_time="Tue, 31 Mar 2009 10:48:33 GMT"/>
-
-			      <child>
-				<widget class="GtkImage" id="image4224">
-				  <property name="visible">True</property>
-				  <property name="stock">gtk-zoom-in</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>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
 			    <widget class="GtkButton" id="button_properties">
 			      <property name="visible">True</property>
 			      <property name="tooltip" translatable="yes">Properties</property>

Modified: trunk/src/execute/multiChronopic.cs
==============================================================================
--- trunk/src/execute/multiChronopic.cs	(original)
+++ trunk/src/execute/multiChronopic.cs	Fri Apr  3 14:21:05 2009
@@ -61,7 +61,7 @@
 	bool cp4StartedIn;
 	
 
-	static bool firstValue = true;
+	static bool firstValue;
 	int chronopics; 
 	
 	public MultiChronopicExecute() {
@@ -209,6 +209,8 @@
 			}
 		}
 
+		firstValue = true;
+
 		//start thread
 		if(chronopics > 0) {
 			thread = new Thread(new ThreadStart(waitEventPre));

Modified: trunk/src/exportSession.cs
==============================================================================
--- trunk/src/exportSession.cs	(original)
+++ trunk/src/exportSession.cs	Fri Apr  3 14:21:05 2009
@@ -167,8 +167,8 @@
 		myJumpsRj = SqliteJumpRj.SelectJumps(mySession.UniqueID, -1, "");
 		myRuns= SqliteRun.SelectRuns(mySession.UniqueID, -1, "");
 		myRunsInterval = SqliteRunInterval.SelectRuns(mySession.UniqueID, -1);
-		myReactionTimes = SqliteReactionTime.SelectAllReactionTimes(mySession.UniqueID, -1);
-		myPulses = SqlitePulse.SelectAllPulses(mySession.UniqueID, -1);
+		myReactionTimes = SqliteReactionTime.SelectReactionTimes(mySession.UniqueID, -1);
+		myPulses = SqlitePulse.SelectPulses(mySession.UniqueID, -1);
 	}
 
 	protected virtual void printTitles(string title) {

Modified: trunk/src/gui/chronojump.cs
==============================================================================
--- trunk/src/gui/chronojump.cs	(original)
+++ trunk/src/gui/chronojump.cs	Fri Apr  3 14:21:05 2009
@@ -1444,7 +1444,7 @@
 
 	//private void fillTreeView_reaction_times (string filter) {
 	private void fillTreeView_reaction_times () {
-		string [] myRTs = SqliteReactionTime.SelectAllReactionTimes(currentSession.UniqueID, -1);
+		string [] myRTs = SqliteReactionTime.SelectReactionTimes(currentSession.UniqueID, -1);
 		myTreeViewReactionTimes.Fill(myRTs, "");
 		expandOrMinimizeTreeView((TreeViewEvent) myTreeViewReactionTimes, treeview_reaction_times);
 	}
@@ -1507,7 +1507,7 @@
 	}
 
 	private void fillTreeView_pulses (string filter) {
-		string [] myPulses = SqlitePulse.SelectAllPulses(currentSession.UniqueID, -1);
+		string [] myPulses = SqlitePulse.SelectPulses(currentSession.UniqueID, -1);
 		myTreeViewPulses.Fill(myPulses, filter);
 		expandOrMinimizeTreeView((TreeViewEvent) myTreeViewPulses, treeview_pulses);
 	}

Modified: trunk/src/gui/eventExecute.cs
==============================================================================
--- trunk/src/gui/eventExecute.cs	(original)
+++ trunk/src/gui/eventExecute.cs	Fri Apr  3 14:21:05 2009
@@ -458,6 +458,7 @@
 		label_time_value.Text = "";
 	}
 
+	bool sizeChanged;
 	public void on_drawingarea_configure_event(object o, ConfigureEventArgs args)
 	{
 		Gdk.EventConfigure ev = args.Event;
@@ -475,7 +476,7 @@
 			sizeChanged = false;
 		}
 	}
-	bool sizeChanged;
+	
 	public void on_drawingarea_expose_event(object o, ExposeEventArgs args)
 	{
 		/* in some mono installations, configure_event is not called, but expose_event yes. 
@@ -491,9 +492,6 @@
 			sizeChanged = false;
 		}
 
-		Console.WriteLine("---------EXPOSE!!!!!--------");
-
-			
 		Gdk.Rectangle area = args.Event.Area;
 
 		//sometimes this is called when pait is finished
@@ -504,7 +502,6 @@
 				area.X, area.Y,
 				area.X, area.Y,
 				area.Width, area.Height);
-//drawingarea.Show();
 		}
 		
 	}
@@ -684,6 +681,8 @@
 			paintTime = true;
 		
 		//obtain data
+		string [] runs = SqliteRun.SelectRuns(sessionID, personID, eventType);
+
 		double timePersonAVG = SqliteSession.SelectAVGEventsOfAType(sessionID, personID, tableName, eventType, "time");
 		double timeSessionAVG = SqliteSession.SelectAVGEventsOfAType(sessionID, -1, tableName, eventType, "time");
 
@@ -703,23 +702,49 @@
 		int bottomMargin = 10; 
 
 		//if max value of graph is automatic
-		if(eventGraphConfigureWin.Max == -1) 
-			if(paintTime)
+		if(eventGraphConfigureWin.Max == -1) {
+			if(paintTime) {
 				maxValue = Util.GetMax(time.ToString() + "=" + timePersonAVG.ToString() + "=" + timeSessionAVG.ToString());
-			else						//paint speed
+				foreach(string myStr in runs) {
+					string [] run = myStr.Split(new char[] {':'});
+					if(Convert.ToDouble(run[6]) > maxValue)
+						maxValue = Convert.ToDouble(run[6]); 
+				}
+			}
+			else {						//paint speed
 				maxValue = Util.GetMax(speed.ToString() + "=" + speedPersonAVG.ToString() + "=" + speedSessionAVG.ToString());
-		else {
+				foreach(string myStr in runs) {
+					string [] run = myStr.Split(new char[] {':'});
+					double mySpeed = Convert.ToDouble(Util.GetSpeed(run[5], run[6], true));
+					if(mySpeed > maxValue)
+						maxValue = mySpeed;
+				}
+			}
+		} else {
 			maxValue = eventGraphConfigureWin.Max;
 			topMargin = 0;
 		}
 			
 		//if min value of graph is automatic
-		if(eventGraphConfigureWin.Min == -1) 
-			if(paintTime)
+		if(eventGraphConfigureWin.Min == -1) {
+			if(paintTime) {
 				minValue = Util.GetMin(time.ToString() + "=" + timePersonAVG.ToString() + "=" + timeSessionAVG.ToString());
-			else
+				foreach(string myStr in runs) {
+					string [] run = myStr.Split(new char[] {':'});
+					if(Convert.ToDouble(run[6]) < minValue)
+						minValue = Convert.ToDouble(run[6]); 
+				}
+			}
+			else {
 				minValue = Util.GetMin(speed.ToString() + "=" + speedPersonAVG.ToString() + "=" + speedSessionAVG.ToString());
-		else {
+				foreach(string myStr in runs) {
+					string [] run = myStr.Split(new char[] {':'});
+					double mySpeed = Convert.ToDouble(Util.GetSpeed(run[5], run[6], true));
+					if(mySpeed < minValue)
+						minValue = mySpeed;
+				}
+			}
+		} else {
 			minValue = eventGraphConfigureWin.Min;
 			bottomMargin = 0;
 		}
@@ -727,9 +752,9 @@
 		
 		//paint graph
 		if(paintTime)
-			paintRunSimple (drawingarea, pen_rojo, time, timePersonAVG, timeSessionAVG, maxValue, minValue, topMargin, bottomMargin);
+			paintRunSimple (drawingarea, pen_rojo, runs, time, timePersonAVG, timeSessionAVG, maxValue, minValue, topMargin, bottomMargin);
 		else						//paint speed
-			paintRunSimple (drawingarea, pen_azul, speed, speedPersonAVG, speedSessionAVG, maxValue, minValue, topMargin, bottomMargin);
+			paintRunSimple (drawingarea, pen_azul, runs, speed, speedPersonAVG, speedSessionAVG, maxValue, minValue, topMargin, bottomMargin);
 		
 		//printLabels
 		printLabelsRunSimple (time, timePersonAVG, timeSessionAVG, speed, speedPersonAVG, speedSessionAVG);
@@ -848,6 +873,8 @@
 
 		
 		//obtain data
+		string [] rts = SqliteReactionTime.SelectReactionTimes(sessionID, personID);
+
 		double timePersonAVG = SqliteSession.SelectAVGEventsOfAType(sessionID, personID, tableName, eventType, "time");
 		double timeSessionAVG = SqliteSession.SelectAVGEventsOfAType(sessionID, -1, tableName, eventType, "time");
 
@@ -877,6 +904,7 @@
 		//paint graph (use simple jump method)
 		//TODO: fix this, paintJumpSimple changed
 		//paintJumpSimple (drawingarea, time, timePersonAVG, timeSessionAVG, 0, 0, 0, maxValue, minValue, topMargin, bottomMargin);
+		paintJumpSimple (drawingarea, rts, time, timePersonAVG, timeSessionAVG, 0, 0, 0, maxValue, minValue, topMargin, bottomMargin);
 
 		printLabelsReactionTime (time, timePersonAVG, timeSessionAVG);
 		
@@ -900,11 +928,6 @@
 		//if max value of graph is automatic
 		if(eventGraphConfigureWin.Max == -1) 
 			maxValue = timestamp; //TODO: delete this, is not used here
-			/*
-			maxValue = Util.GetMax(
-					cp1InString + "=" + cp1OutStr + "=" + cp2InString + "=" + cp2OutStr + "=" +
-					cp3InString + "=" + cp3OutStr + "=" + cp4InString + "=" + cp4OutStr);
-					*/
 		else {
 			maxValue = eventGraphConfigureWin.Max; //TODO
 			topMargin = 0;
@@ -916,11 +939,6 @@
 		//if min value of graph is automatic
 		if(eventGraphConfigureWin.Min == -1) 
 			minValue = 0;
-		/*
-			minValue = Util.GetMin(
-					cp1InString + "=" + cp1OutStr + "=" + cp2InString + "=" + cp2OutStr + "=" +
-					cp3InString + "=" + cp3OutStr + "=" + cp4InString + "=" + cp4OutStr);
-					*/
 		else {
 			minValue = eventGraphConfigureWin.Min; //TODO
 			bottomMargin = 0;
@@ -983,22 +1001,32 @@
 		int ancho=drawingarea.Allocation.Width;
 		int alto=drawingarea.Allocation.Height;
 		
-		
 		erasePaint(drawingarea);
-		
 		writeMarginsText(maxValue, minValue, alto);
 		
 		//check now here that we will have not division by zero problems
 		if(maxValue - minValue > 0) {
+			//calculate separation between series and bar width
+			int tctfSep = 0; //separation between tc and tf
+			int distanceBetweenCols = Convert.ToInt32((ancho-rightMargin)*(1+.5)/jumps.Length) -
+					Convert.ToInt32((ancho-rightMargin)*(0+.5)/jumps.Length);
+			if(tcNow > 0)
+				tctfSep = Convert.ToInt32(.3*distanceBetweenCols);
+			int barWidth = Convert.ToInt32(.3*distanceBetweenCols);
+			int barDesplLeft = Convert.ToInt32(.5*barWidth);
+
 			//red for TC
 			if(tcNow > 0) {
 				int count = 0;
 				foreach(string myStr in jumps) {
 					string [] jump = myStr.Split(new char[] {':'});
-					pixmap.DrawLine(pen_rojo, 
-							Convert.ToInt32((ancho-rightMargin)*(count+.5)/jumps.Length), alto, 
-							Convert.ToInt32((ancho-rightMargin)*(count+.5)/jumps.Length), 
-							calculatePaintHeight(Convert.ToDouble(jump[6]), alto, maxValue, minValue, topMargin, bottomMargin));
+					Rectangle rect = new Rectangle(
+							Convert.ToInt32((ancho-rightMargin)*(count+.5)/jumps.Length)-barDesplLeft, 
+							calculatePaintHeight(Convert.ToDouble(jump[6]), alto, maxValue, minValue, 
+								topMargin, bottomMargin),
+							barWidth, alto
+							);
+					pixmap.DrawRectangle(pen_rojo, true, rect);
 					count ++;
 				}
 				
@@ -1010,47 +1038,31 @@
 			//blue for TF
 			//check it's not a take off
 			if(tvNow > 0) {
-				int tctfSep; //separation between tc and tf
-				if(tcNow == 0)
-					tctfSep = 0;
-				else {
-					int distanceBetweenCols = Convert.ToInt32((ancho-rightMargin)*(1+.5)/jumps.Length) -
-						Convert.ToInt32((ancho-rightMargin)*(0+.5)/jumps.Length);
-					tctfSep = Convert.ToInt32(.3*distanceBetweenCols);
-				}
 				int count = 0;
 				foreach(string myStr in jumps) {
 					string [] jump = myStr.Split(new char[] {':'});
-					pixmap.DrawLine(pen_azul, 
-							Convert.ToInt32((ancho-rightMargin)*(count+.5)/jumps.Length) + tctfSep, alto, 
-							Convert.ToInt32((ancho-rightMargin)*(count+.5)/jumps.Length) + tctfSep, 
-							calculatePaintHeight(Convert.ToDouble(jump[5]), alto, maxValue, minValue, topMargin, bottomMargin));
+					//jump[5] is ok fo jump.tv and for reactionTime.time
+					Rectangle rect = new Rectangle(
+							Convert.ToInt32((ancho-rightMargin)*(count+.5)/jumps.Length)-barDesplLeft +tctfSep, 
+							calculatePaintHeight(Convert.ToDouble(jump[5]), alto, maxValue, minValue, 
+								topMargin, bottomMargin),
+							barWidth, alto
+							);
+					pixmap.DrawRectangle(pen_azul, true, rect);
 					count ++;
 				}
 				
 				//blue tf average discountinuos line	
 				drawGuideOrAVG(pen_azul, 	tvPerson, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
 				drawGuideOrAVG(pen_azul_discont, tvSession, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
+		
+				//write "last" to show last jump
+				layout.SetMarkup(Catalog.GetString("Last"));
+				pixmap.DrawLayout (pen_gris, 
+						Convert.ToInt32((ancho-rightMargin)*(count-.5)/jumps.Length)-barDesplLeft + tctfSep, 
+						0, layout);
 			}
 			
-			/*
-			//circles
-			if(eventGraphConfigureWin.PaintCircle) {
-				if(tcNow > 0) {
-					pixmap.DrawArc(pen_rojo, true, ancho*1/6 - radio/2 + arcSystemCorrection, calculatePaintHeight(tcNow, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-					pixmap.DrawArc(pen_rojo, true, ancho*3/6 - radio/2 + arcSystemCorrection, calculatePaintHeight(tcPerson, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-					pixmap.DrawArc(pen_rojo, true, ancho*5/6 - radio/2 + arcSystemCorrection, calculatePaintHeight(tcSession, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-				}
-				//check it's not a take off
-				if(tvNow > 0) {
-					pixmap.DrawArc(pen_azul, true, ancho*1/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvNow, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-					pixmap.DrawArc(pen_azul, true, ancho*3/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvPerson, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-					pixmap.DrawArc(pen_azul, true, ancho*5/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvSession, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-				}
-			}
-		*/	
-			
-	
 			//paint reference guide black and green if needed
 			drawGuideOrAVG(pen_negro_discont, eventGraphConfigureWin.BlackGuide, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
 			drawGuideOrAVG(pen_green_discont, eventGraphConfigureWin.GreenGuide, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
@@ -1059,39 +1071,58 @@
 		graphProgress = phasesGraph.DONE; 
 	}
 
-	private void paintRunSimple (Gtk.DrawingArea drawingarea, Gdk.GC myPen, double now, double person, double session,
+	private void paintRunSimple (Gtk.DrawingArea drawingarea, Gdk.GC myPen, string [] runs, 
+			double now, double person, double session,
 			double maxValue, double minValue, int topMargin, int bottomMargin)
 	{
 		int ancho=drawingarea.Allocation.Width;
 		int alto=drawingarea.Allocation.Height;
 		
-		
 		erasePaint(drawingarea);
-		
 		writeMarginsText(maxValue, minValue, alto);
 		
 		//check now here that we will have not division by zero problems
 		if(maxValue - minValue > 0) {
-			pixmap.DrawLine(myPen, ancho*1/6 , alto, ancho*1/6 , calculatePaintHeight(now, alto, maxValue, minValue, topMargin, bottomMargin));
-			pixmap.DrawLine(myPen, ancho*3/6 , alto, ancho*3/6 , calculatePaintHeight(person, alto, maxValue, minValue, topMargin, bottomMargin));
-			pixmap.DrawLine(myPen, ancho*5/6 , alto, ancho*5/6 , calculatePaintHeight(session, alto, maxValue, minValue, topMargin, bottomMargin));
-
+			//calculate bar width
+			int distanceBetweenCols = Convert.ToInt32((ancho-rightMargin)*(1+.5)/runs.Length) -
+					Convert.ToInt32((ancho-rightMargin)*(0+.5)/runs.Length);
+			int barWidth = Convert.ToInt32(.3*distanceBetweenCols);
+			int barDesplLeft = Convert.ToInt32(.5*barWidth);
 
-			if(eventGraphConfigureWin.PaintCircle) {
-				pixmap.DrawArc(myPen, true, ancho*1/6 - radio/2 + arcSystemCorrection, calculatePaintHeight(now, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-				pixmap.DrawArc(myPen, true, ancho*3/6 - radio/2 + arcSystemCorrection, calculatePaintHeight(person, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-				pixmap.DrawArc(myPen, true, ancho*5/6 - radio/2 + arcSystemCorrection, calculatePaintHeight(session, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
-			}	
+			//blue for TF
+			if(now > 0) {
+				int count = 0;
+				foreach(string myStr in runs) {
+					string [] run = myStr.Split(new char[] {':'});
+					Rectangle rect = new Rectangle(
+							Convert.ToInt32((ancho-rightMargin)*(count+.5)/runs.Length)-barDesplLeft, 
+							calculatePaintHeight(Convert.ToDouble(run[6]), alto, maxValue, minValue, 
+								topMargin, bottomMargin),
+							barWidth, alto
+							);
+					//TODO: do speed related
+					pixmap.DrawRectangle(pen_azul, true, rect);
+					count ++;
+				}
+				
+				//blue tf average discountinuos line	
+				drawGuideOrAVG(pen_azul, 	person, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
+				drawGuideOrAVG(pen_azul_discont, session, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
+		
+				//write "last" to show last jump
+				layout.SetMarkup(Catalog.GetString("Last"));
+				pixmap.DrawLayout (pen_gris, 
+						Convert.ToInt32((ancho-rightMargin)*(count-.5)/runs.Length)-barDesplLeft, 
+						0, layout);
+			}
 			
-	
 			//paint reference guide black and green if needed
 			drawGuideOrAVG(pen_negro_discont, eventGraphConfigureWin.BlackGuide, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
 			drawGuideOrAVG(pen_green_discont, eventGraphConfigureWin.GreenGuide, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
 		}
 		
-	
-		
 		graphProgress = phasesGraph.DONE; 
+
 	}
 
 	
@@ -1429,7 +1460,10 @@
 	double multiChronopicGetX(int ancho, double time, double timeOld, double timeTotal) {
 		if(time < 0)
 			time = 0;
-		//Console.WriteLine("   timestamp {0}, ancho {1}, x {2}, timeold{3}, xOld{4}", timestamp, ancho, Util.TrimDecimals(x,1), timeOld, Util.TrimDecimals(xOld,1));
+
+		//Console.WriteLine("   timestamp {0}, ancho {1}, x {2}, timeold{3}, xOld{4}", 
+		//timestamp, ancho, Util.TrimDecimals(x,1), timeOld, Util.TrimDecimals(xOld,1));
+
 		return ( ancho * ( (timeOld + time) / timeTotal) ) -rightMargin;
 	}
 
@@ -1595,26 +1629,6 @@
 	}
 	
 	
-	void on_button_zoom_clicked (object o, EventArgs args) {
-//drawingarea.Size(700,200);
-//event_execute.SetDefaultSize(700,200);
-//hbox_drawingarea.SetDefaultSize(700,200);
-//drawingarea.SetSizeRequest(700,200);
-sizeChanged = true;
-//drawingarea.ConfigureEvent;
-//drawingarea.ExposeEvent;
-/*
-Gtk.Object o = new Gtk.Object();
-ConfigureEventArgs args = new ConfigureEventArgs();
-on_drawingarea_configure_event(o, args);
-on_drawingarea_expose_event(o, args);
-*/
-//on_drawingarea_configure_event((Gtk.Object) drawingarea, new ConfigureEventArgs());
-//on_drawingarea_expose_event((Gtk.Object) drawingarea, new ExposeEventArgs());
-
-	}
-
-	
 	void on_button_properties_clicked (object o, EventArgs args) {
 		//now show the eventGraphConfigureWin
 		eventGraphConfigureWin = EventGraphConfigureWindow.Show(true);

Modified: trunk/src/report.cs
==============================================================================
--- trunk/src/report.cs	(original)
+++ trunk/src/report.cs	Fri Apr  3 14:21:05 2009
@@ -125,10 +125,10 @@
 			myRunsInterval = SqliteRunInterval.SelectRuns(sessionID, -1);
 		}
 		if(ShowReactionTimes) {
-			myReactionTimes= SqliteReactionTime.SelectAllReactionTimes(sessionID, -1);
+			myReactionTimes= SqliteReactionTime.SelectReactionTimes(sessionID, -1);
 		}
 		if(ShowPulses) {
-			myPulses= SqlitePulse.SelectAllPulses(sessionID, -1);
+			myPulses= SqlitePulse.SelectPulses(sessionID, -1);
 		}
 	}
 	

Modified: trunk/src/server.cs
==============================================================================
--- trunk/src/server.cs	(original)
+++ trunk/src/server.cs	Fri Apr  3 14:21:05 2009
@@ -421,7 +421,7 @@
 				countE = 0;					
 				countS = 0;					
 
-				string [] rts = SqliteReactionTime.SelectAllReactionTimes(currentSession.UniqueID, person.UniqueID);
+				string [] rts = SqliteReactionTime.SelectReactionTimes(currentSession.UniqueID, person.UniqueID);
 				foreach(string myRt in rts) {
 					string [] js = myRt.Split(new char[] {':'});
 					//select rt
@@ -450,7 +450,7 @@
 				countE = 0;					
 				countS = 0;					
 
-				string [] pulses = SqlitePulse.SelectAllPulses(currentSession.UniqueID, person.UniqueID);
+				string [] pulses = SqlitePulse.SelectPulses(currentSession.UniqueID, person.UniqueID);
 				foreach(string myPulse in pulses) {
 					string [] js = myPulse.Split(new char[] {':'});
 					//select pulse

Modified: trunk/src/sqlite/pulse.cs
==============================================================================
--- trunk/src/sqlite/pulse.cs	(original)
+++ trunk/src/sqlite/pulse.cs	Fri Apr  3 14:21:05 2009
@@ -82,7 +82,7 @@
 	
 
 	//if all persons, put -1 in personID
-	public static string[] SelectAllPulses(int sessionID, int personID) 
+	public static string[] SelectPulses(int sessionID, int personID) 
 	{
 		string filterPersonString = "";
 		if(personID != -1)

Modified: trunk/src/sqlite/reactionTime.cs
==============================================================================
--- trunk/src/sqlite/reactionTime.cs	(original)
+++ trunk/src/sqlite/reactionTime.cs	Fri Apr  3 14:21:05 2009
@@ -79,7 +79,7 @@
 	}
 
 	//if all persons, put -1 in personID
-	public static string[] SelectAllReactionTimes(int sessionID, int personID) 
+	public static string[] SelectReactionTimes(int sessionID, int personID) 
 	{
 		string filterPersonString = "";
 		if(personID != -1)

Modified: trunk/web/data/langs/_es/Pages/photocells
==============================================================================
--- trunk/web/data/langs/_es/Pages/photocells	(original)
+++ trunk/web/data/langs/_es/Pages/photocells	Fri Apr  3 14:21:05 2009
@@ -3,12 +3,20 @@
 :::endTitle:::
 
 <ol>
+<li>Nuevo! ConexiÃn de fotocÃlula Velleman PEM10D al Chronopic
 <li>CreaciÃn de una barrera de infrarrojos
 <li>FotocÃlulas disponibles en el mercado
 <li>Aportar informaciÃn
 </ol>
 
-<h5>1.- CreaciÃn de una barrera de infrarrojos (Juan Fernando Pardo)</h5>
+<h5>1.- Nuevo! ConexiÃn de fotocÃlula Velleman PEM10D al Chronopic
+
+<img src=":::imageLink:::/velleman_connecting5_small.jpg">
+
+<br>
+Lea <a href="photocells_velleman_es.html">ConexiÃn de fotocÃlula Velleman PEM10D al Chronopic</a>
+
+<h5>2.- CreaciÃn de una barrera de infrarrojos (Juan Fernando Pardo)</h5>
 
 Esquema de barreras infrarrojas: <a href=":::webLink:::/barreras-sch-color.pdf">Barreras Infrarojas Chronojump</a>.
 <br><br>
@@ -95,7 +103,7 @@
 Agradecimientos a Juan Fernando Pardo por su aportaciÃn en este apartado.
 
 
-<h5>2.- FotocÃlulas disponibles en el mercado (Josep Ma PadullÃs)</h5>
+<h5>3.- FotocÃlulas disponibles en el mercado (Josep Ma PadullÃs)</h5>
 
 
 <table width="100%" border="0" cellspacing="2" cellpadding="2">
@@ -108,7 +116,8 @@
 
 Agradecimientos a JMa PadullÃs por su aportaciÃn en este apartado.
 
-<h5>3.- Aportar informaciÃn</h5>
+<!--
+<h5>4.- Aportar informaciÃn</h5>
 
 Este apartado requiere de su colaboraciÃn, si quiere aÃadir o modificar cualquier informaciÃn, escriba <a href="contact_es.html">a la lista de desarrolladores: chronojump-devel</a>, o escriba un correo a la direcciÃn que se ve en esta imagen: <img align="top" src=":::imageLink:::/xaviblas-correo.png">
-
+-->

Added: trunk/web/data/languages_with_de.txt
==============================================================================
--- (empty file)
+++ trunk/web/data/languages_with_de.txt	Fri Apr  3 14:21:05 2009
@@ -0,0 +1,8 @@
+CatalÃ:_ca
+Deutsch:_de
+English:_en
+EspaÃol:_es
+FranÃais:_fr
+Galego:_gl
+Italiano:_it
+PortuguÃs:_pt

Added: trunk/web/html_created_no_edit/images/pulsador1.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/pulsador2.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/pulsador3.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/pulsador4.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting1.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting1_small.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting2_rca.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting2_rca_small.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting3.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting3_small.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting4.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting4_small.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting5.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting5_small.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting6.jpg
==============================================================================
Binary file. No diff available.

Added: trunk/web/html_created_no_edit/images/velleman_connecting6_small.jpg
==============================================================================
Binary file. No diff available.

Modified: trunk/web/html_created_no_edit/photocells_es.html
==============================================================================
--- trunk/web/html_created_no_edit/photocells_es.html	(original)
+++ trunk/web/html_created_no_edit/photocells_es.html	Fri Apr  3 14:21:05 2009
@@ -52,12 +52,20 @@
 </tt></font></a></td></tr></table>
 
 <ol>
+<li>Nuevo! Conexi&oacute;n de fotoc&eacute;lula Velleman PEM10D al Chronopic
 <li>Creaci&oacute;n de una barrera de infrarrojos
 <li>Fotoc&eacute;lulas disponibles en el mercado
 <li>Aportar informaci&oacute;n
 </ol>
 
-<h5>1.- Creaci&oacute;n de una barrera de infrarrojos (Juan Fernando Pardo)</h5>
+<h5>1.- Nuevo! Conexi&oacute;n de fotoc&eacute;lula Velleman PEM10D al Chronopic
+
+<img src="http://projects.gnome.org/chronojump/images/velleman_connecting5_small.jpg";>
+
+<br>
+Lea <a href="photocells_velleman_es.html">Conexi&oacute;n de fotoc&eacute;lula Velleman PEM10D al Chronopic</a>
+
+<h5>2.- Creaci&oacute;n de una barrera de infrarrojos (Juan Fernando Pardo)</h5>
 
 Esquema de barreras infrarrojas: <a href="http://projects.gnome.org/chronojump/barreras-sch-color.pdf";>Barreras Infrarojas Chronojump</a>.
 <br><br>
@@ -144,7 +152,7 @@
 Agradecimientos a Juan Fernando Pardo por su aportaci&oacute;n en este apartado.
 
 
-<h5>2.- Fotoc&eacute;lulas disponibles en el mercado (Josep Ma Padull&eacute;s)</h5>
+<h5>3.- Fotoc&eacute;lulas disponibles en el mercado (Josep Ma Padull&eacute;s)</h5>
 
 
 <table width="100%" border="0" cellspacing="2" cellpadding="2">
@@ -157,10 +165,11 @@
 
 Agradecimientos a JMa Padull&eacute;s por su aportaci&oacute;n en este apartado.
 
-<h5>3.- Aportar informaci&oacute;n</h5>
+<!--
+<h5>4.- Aportar informaci&oacute;n</h5>
 
 Este apartado requiere de su colaboraci&oacute;n, si quiere a&ntilde;adir o modificar cualquier informaci&oacute;n, escriba <a href="contact_es.html">a la lista de desarrolladores: chronojump-devel</a>, o escriba un correo a la direcci&oacute;n que se ve en esta imagen: <img align="top" src="http://projects.gnome.org/chronojump/images/xaviblas-correo.png";>
-
+-->
 </div></div>
 </td><td>
 <div id="sidebar">



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]