[chronojump] code cleaning



commit 536926d6e59c584a0fd7c98ebb3c6c7835bf6c64
Author: Xavier de Blas <xaviblas master gnome org>
Date:   Thu Jun 17 20:01:51 2010 +0800

    code cleaning

 chronojump_server/bin/chronojumpServer.dll |  Bin 282624 -> 282624 bytes
 src/chronojump.cs                          |    5 +--
 src/execute/jump.cs                        |    2 +-
 src/exportSession.cs                       |    2 -
 src/gui/chronojump.cs                      |   37 ++++++++-------------------
 src/gui/chronopic.cs                       |    9 +++----
 src/gui/confirm.cs                         |   10 ++-----
 src/gui/convertWeight.cs                   |   12 ++-------
 src/gui/eventExecute.cs                    |   23 -----------------
 src/gui/jump.cs                            |    4 +-
 src/gui/jumpType.cs                        |    3 +-
 src/gui/person.cs                          |   16 ++++--------
 src/gui/preferences.cs                     |    4 +-
 src/gui/queryServer.cs                     |    1 -
 src/gui/report.cs                          |    1 -
 src/gui/run.cs                             |    9 ++----
 src/gui/runType.cs                         |    3 +-
 src/gui/session.cs                         |    5 +---
 src/gui/stats.cs                           |    1 -
 src/log.cs                                 |    2 +-
 src/multiChronopic.cs                      |    1 -
 src/person.cs                              |    8 +-----
 src/sqlite/personSession.cs                |    2 -
 src/statType.cs                            |   28 ---------------------
 src/stats/graphs/ieIub.cs                  |    1 -
 src/stats/main.cs                          |    1 -
 src/stats/rjAVGSD.cs                       |    1 -
 src/treeViewEvent.cs                       |    3 +-
 src/treeViewMultiChronopic.cs              |    9 -------
 29 files changed, 42 insertions(+), 161 deletions(-)
---
diff --git a/chronojump_server/bin/chronojumpServer.dll b/chronojump_server/bin/chronojumpServer.dll
index a740ce0..0464911 100755
Binary files a/chronojump_server/bin/chronojumpServer.dll and b/chronojump_server/bin/chronojumpServer.dll differ
diff --git a/src/chronojump.cs b/src/chronojump.cs
index b0f0057..7e92bd4 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -32,7 +32,6 @@ using System.Collections; //ArrayList
 
 public class ChronoJump 
 {
-	ChronoJumpWindow chronoJumpWin;
 	SplashWindow splashWin;
 	
 	private static string progVersion = ""; //now in "version" file
@@ -98,7 +97,7 @@ public class ChronoJump
 		Application.Init();
 
 		//start threading to show splash window
-		SplashWindow splashWin = SplashWindow.Show();
+		SplashWindow.Show();
 		createdSplashWin = true;
 
 		fakeSplashButton = new Gtk.Button();
@@ -420,7 +419,7 @@ Console.WriteLine("--6--");
 		}
 		Log.WriteLine("all SQL done! starting Chronojump");
 
-		chronoJumpWin = new ChronoJumpWindow(progVersion, progName, runningFileName);
+		new ChronoJumpWindow(progVersion, progName, runningFileName);
 	}
 
 	private static void createBlankDB() {
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index f30cea8..c668480 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -927,7 +927,7 @@ public class JumpRjExecute : JumpExecute
 		}
 
 		if(type == Constants.RunAnalysisName) {
-			double speed = (fall /10) / Util.GetTotalTime(tcString, tvString);
+			//double speed = (fall /10) / Util.GetTotalTime(tcString, tvString);
 	
 	/*		
 	 *		Josep Ma Padullés test
diff --git a/src/exportSession.cs b/src/exportSession.cs
index 012d1f5..ad2e00b 100644
--- a/src/exportSession.cs
+++ b/src/exportSession.cs
@@ -638,7 +638,6 @@ public class ExportSession
 		int dec=prefsDigitsNumber; //decimals
 		
 		ArrayList myData = new ArrayList(1);
-		bool isFirstHeader = true;
 		
 		if(myPulses.Length > 0) 
 			printTitles(title); 
@@ -700,7 +699,6 @@ public class ExportSession
 		int dec=prefsDigitsNumber; //decimals
 		
 		ArrayList myData = new ArrayList(1);
-		bool isFirstHeader = true;
 		
 		if(myMCs.Length > 0) 
 			printTitles(title); 
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 255ecbf..b6c798f 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -339,7 +339,6 @@ public class ChronoJumpWindow
 	PersonsRecuperateFromOtherSessionWindow personsRecuperateFromOtherSessionWin; 
 	PersonAddModifyWindow personAddModifyWin; 
 	PersonAddMultipleWindow personAddMultipleWin; 
-	PersonShowAllEventsWindow personShowAllEventsWin;
 	JumpsMoreWindow jumpsMoreWin;
 	JumpsRjMoreWindow jumpsRjMoreWin;
 	JumpExtraWindow jumpExtraWin; //for normal and repetitive jumps 
@@ -372,14 +371,12 @@ public class ChronoJumpWindow
 	GenericWindow genericWin;
 		
 	EvaluatorWindow evalWin;
-	QueryServerWindow queryServerWin;
 	PersonNotUploadWindow personNotUploadWin; 
 	
 	ChronopicWindow chronopicWin;
 	
 	static EventExecuteWindow eventExecuteWin;
 
-	private bool firstTestInSession = true; //since we started chronojump
 	private bool firstRjValue;
 	private double rjTcCount;
 	private double rjTvCount;
@@ -388,8 +385,6 @@ public class ChronoJumpWindow
 	
 	private bool createdStatsWin;
 	
-	private bool preferencesLoaded;
-
 	private string progVersion;
 	private string progName;
 
@@ -441,9 +436,7 @@ public class ChronoJumpWindow
 
 		//preferencesLoaded is a fix to a gtk#-net-windows-bug where radiobuttons raise signals
 		//at initialization of chronojump and gives problems if this signals are raised while preferences are loading
-		preferencesLoaded = false;
 		loadPreferences ();
-		preferencesLoaded = true;
 
 		createTreeView_persons (treeview_persons);
 		createTreeView_jumps (treeview_jumps);
@@ -884,7 +877,7 @@ public class ChronoJumpWindow
 	private void on_menuitem_server_query_activate (object o, EventArgs args) {
 		if(connectedAndCanI(Constants.ServerActionQuery)) {
 			ChronojumpServer myServer = new ChronojumpServer();
-			queryServerWin = QueryServerWindow.Show(
+			QueryServerWindow.Show(
 					prefsDigitsNumber,
 					myServer.SelectEvaluators(true)
 					);
@@ -2115,7 +2108,7 @@ public class ChronoJumpWindow
 
 	
 	private void on_show_all_person_events_activate (object o, EventArgs args) {
-		personShowAllEventsWin = PersonShowAllEventsWindow.Show(app1, currentSession.UniqueID, currentPerson);
+		PersonShowAllEventsWindow.Show(app1, currentSession.UniqueID, currentPerson);
 	}
 	
 	
@@ -2427,7 +2420,7 @@ public class ChronoJumpWindow
 	}
 		
 	//mark to only get inside on_multi_chronopic_finished one time
-	static bool multiFinishingByClickFinish;
+	//static bool multiFinishingByClickFinish;
 	private void on_finish_multi_clicked (object o, EventArgs args) 
 	{
 		/*
@@ -2825,7 +2818,6 @@ Console.WriteLine("X");
 				jumpWeight = Util.WeightFromKgToPercent(jumpExtraWin.Weight, currentPersonSession.Weight);
 		}
 		double myFall = 0;
-		bool arms = false;
 		if(currentJumpType.Name == Constants.TakeOffName || currentJumpType.Name == Constants.TakeOffWeightName)
 			myFall = 0;
 		else if( ! currentJumpType.StartIn) {
@@ -3897,7 +3889,7 @@ Console.WriteLine("X");
 			); //-1: unlimited pulses (or changes)
 
 		eventExecuteWin.ButtonCancel.Clicked += new EventHandler(on_cancel_multi_clicked);
-		multiFinishingByClickFinish = false;
+		//multiFinishingByClickFinish = false;
 		eventExecuteWin.ButtonFinish.Clicked += new EventHandler(on_finish_multi_clicked);
 		
 		//when user clicks on update the eventExecute window 
@@ -4351,8 +4343,7 @@ Console.WriteLine("X");
 		if (myTreeViewJumps.EventSelectedID > 0) {
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
-				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected jump?", 
-						"", "jump", myTreeViewJumps.EventSelectedID);
+				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected jump?", "");
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_jump_accepted);
 			} else {
 				on_delete_selected_jump_accepted(o, args);
@@ -4369,8 +4360,7 @@ Console.WriteLine("X");
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
 				confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want to delete selected jump?"), 
-						 Catalog.GetString("Attention: Deleting a Reactive subjump will delete the whole jump"), 
-						 "jump", myTreeViewJumpsRj.EventSelectedID);
+						 Catalog.GetString("Attention: Deleting a Reactive subjump will delete the whole jump"));
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_jump_rj_accepted);
 			} else {
 				on_delete_selected_jump_rj_accepted(o, args);
@@ -4415,8 +4405,7 @@ Console.WriteLine("X");
 		if (myTreeViewRuns.EventSelectedID > 0) {
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
-				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected run?", 
-						"", "run", myTreeViewRuns.EventSelectedID);
+				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected run?", "");
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_run_accepted);
 			} else {
 				on_delete_selected_run_accepted(o, args);
@@ -4434,8 +4423,7 @@ Console.WriteLine("X");
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
 				confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want to delete selected run?"), 
-						 Catalog.GetString("Attention: Deleting a Intervallic subrun will delete the whole run"), 
-						 "run", myTreeViewJumpsRj.EventSelectedID);
+						 Catalog.GetString("Attention: Deleting a Intervallic subrun will delete the whole run"));
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_run_interval_accepted);
 			} else {
 				on_delete_selected_run_interval_accepted(o, args);
@@ -4483,8 +4471,7 @@ Console.WriteLine("X");
 		if (myTreeViewReactionTimes.EventSelectedID > 0) {
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
-				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected test?", 
-						"", "reactiontime", myTreeViewReactionTimes.EventSelectedID);
+				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected test?", "");
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_reaction_time_accepted);
 			} else {
 				on_delete_selected_reaction_time_accepted(o, args);
@@ -4518,8 +4505,7 @@ Console.WriteLine("X");
 		if (myTreeViewPulses.EventSelectedID > 0) {
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
-				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected test?", 
-						"", "pulses", myTreeViewPulses.EventSelectedID);
+				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected test?", "");
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_pulse_accepted);
 			} else {
 				on_delete_selected_pulse_accepted(o, args);
@@ -4551,8 +4537,7 @@ Console.WriteLine("X");
 		if (myTreeViewMultiChronopic.EventSelectedID > 0) {
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
-				confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want to delete selected test?"), 
-						"", "jump", myTreeViewMultiChronopic.EventSelectedID);
+				confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want to delete selected test?"), "");
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_multi_chronopic_accepted);
 			} else {
 				on_delete_selected_multi_chronopic_accepted(o, args);
diff --git a/src/gui/chronopic.cs b/src/gui/chronopic.cs
index d0a35f6..251d019 100644
--- a/src/gui/chronopic.cs
+++ b/src/gui/chronopic.cs
@@ -107,17 +107,14 @@ public class ChronopicWindow
 	
 	//cp2	
 	Chronopic cp2;
-	SerialPort sp2;
 	Chronopic.Plataforma platformState2;
 
 	//cp3	
 	Chronopic cp3;
-	SerialPort sp3;
 	Chronopic.Plataforma platformState3;
 
 	//cp4	
 	Chronopic cp4;
-	SerialPort sp4;
 	Chronopic.Plataforma platformState4;
 
 	States loggedState;		//log of last state
@@ -274,7 +271,6 @@ public class ChronopicWindow
 	private void createComboWindows() {
 		//combo port stuff
 		comboWindowsOptions = new string[257];
-		int count = 0;
 		for (int i=1; i <= 257; i ++)
 			comboWindowsOptions[i-1] = "COM" + i;
 	
@@ -485,7 +481,6 @@ public class ChronopicWindow
 	
 
 	private void on_button_connect_cp_clicked (object o, EventArgs args) {
-		Button btn = o as Button;
 		if (o == null)
 			return;
 
@@ -556,6 +551,10 @@ public class ChronopicWindow
 			if(connected)
 				return;
 		}
+	
+		SerialPort sp2;
+		SerialPort sp3;
+		SerialPort sp4;
 
 		string message = "";
 		string myPort = "";
diff --git a/src/gui/confirm.cs b/src/gui/confirm.cs
index 468ff87..06f240f 100644
--- a/src/gui/confirm.cs
+++ b/src/gui/confirm.cs
@@ -34,11 +34,9 @@ public class ConfirmWindowJumpRun
 	[Widget] Gtk.Label label_question;
 	[Widget] Gtk.Button button_accept;
 
-	string table;
-	int uniqueID;
 	static ConfirmWindowJumpRun ConfirmWindowJumpRunBox;
 	
-	public ConfirmWindowJumpRun (string text1, string question, string table, int uniqueID)
+	public ConfirmWindowJumpRun (string text1, string question)
 	{
 		//Setup (text, table, uniqueID);
 		Glade.XML gladeXML;
@@ -50,14 +48,12 @@ public class ConfirmWindowJumpRun
 		
 		label1.Text = text1;
 		label_question.Text = question;
-		this.table = table;
-		this.uniqueID = uniqueID;
 	}
 
-	static public ConfirmWindowJumpRun Show (string text1, string question, string table, int uniqueID)
+	static public ConfirmWindowJumpRun Show (string text1, string question)
 	{
 		if (ConfirmWindowJumpRunBox == null) {
-			ConfirmWindowJumpRunBox = new ConfirmWindowJumpRun(text1, question, table, uniqueID);
+			ConfirmWindowJumpRunBox = new ConfirmWindowJumpRun(text1, question);
 		}
 		ConfirmWindowJumpRunBox.confirm_window.Show ();
 		
diff --git a/src/gui/convertWeight.cs b/src/gui/convertWeight.cs
index 763242e..f13b555 100644
--- a/src/gui/convertWeight.cs
+++ b/src/gui/convertWeight.cs
@@ -38,8 +38,6 @@ public class ConvertWeightWindow
 	TreeStore store;
 	double oldPersonWeight;
 	double newPersonWeight;
-	int sessionID;
-	int personID;
 	string [] jumpsNormal;
 	string [] jumpsReactive;
 	int columnBool1 = 6;
@@ -47,7 +45,7 @@ public class ConvertWeightWindow
 	string simpleString;
 	string reactiveString;
 	
-	ConvertWeightWindow (int sessionID, int personID, double oldPersonWeight, double newPersonWeight, string [] jumpsNormal, string [] jumpsReactive) {
+	ConvertWeightWindow (double oldPersonWeight, double newPersonWeight, string [] jumpsNormal, string [] jumpsReactive) {
 		Glade.XML gladeXML;
 		gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "convert_weight", null);
 		gladeXML.Autoconnect(this);
@@ -57,8 +55,6 @@ public class ConvertWeightWindow
 
 		this.oldPersonWeight = oldPersonWeight;
 		this.newPersonWeight = newPersonWeight;
-		this.sessionID = sessionID;
-		this.personID = personID;
 		this.jumpsNormal = jumpsNormal;
 		this.jumpsReactive = jumpsReactive;
 					
@@ -88,13 +84,12 @@ public class ConvertWeightWindow
 		fillTreeView( treeview1, store );
 	}
 
-	static public new ConvertWeightWindow Show (int sessionID, int personID, 
+	static public new ConvertWeightWindow Show (
 			double oldPersonWeight, double newPersonWeight, string [] jumpsNormal, string [] jumpsReactive)
 	{
 		if (ConvertWeightWindowBox == null) {
 			ConvertWeightWindowBox = 
-				new ConvertWeightWindow (sessionID, personID, 
-						oldPersonWeight, newPersonWeight, jumpsNormal, jumpsReactive);
+				new ConvertWeightWindow (oldPersonWeight, newPersonWeight, jumpsNormal, jumpsReactive);
 		}
 	
 		ConvertWeightWindowBox.label_old_weight_value.Text = oldPersonWeight.ToString() + " Kg";
@@ -264,7 +259,6 @@ public class ConvertWeightWindow
 		
 		int jumpID;
 		bool option1;
-		int count = 0;
 		if (store.GetIterFirst(out iter)) {
 			//don't catch 0 value
 			while ( store.IterNext(ref iter) ){
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 6c99035..16b8a6e 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -147,7 +147,6 @@ public class EventExecuteWindow
 	int sessionID;	
 	string tableName;	
 	string eventType;	
-	private string lastEventWas;
 	
 	int pDN;
 	double limit;
@@ -155,7 +154,6 @@ public class EventExecuteWindow
 	private enum phasesGraph {
 		UNSTARTED, DOING, DONE
 	}
-	private phasesGraph graphProgress;
 	
 	int radio = 8; 		//radious of the circles
 	int arcSystemCorrection = 0; //on Windows circles are paint just one pixel left, fix it
@@ -272,10 +270,6 @@ public class EventExecuteWindow
 		else if (tableName == "reactionTime")
 			showReactionTimeLabels(); 
 
-		//for the "update" button
-		lastEventWas = tableName;
-			
-		
 		button_cancel.Sensitive = true;
 		button_close.Sensitive = false;
 
@@ -293,8 +287,6 @@ public class EventExecuteWindow
 		eventbox_run_interval_speed.ModifyBg(Gtk.StateType.Normal, new Gdk.Color( 0, 0, 255));
 		eventbox_pulse_time.ModifyBg(Gtk.StateType.Normal, new Gdk.Color( 0, 0, 255)); //only one serie in pulse, leave blue
 		
-		graphProgress = phasesGraph.UNSTARTED; 
-
 		layout = new Pango.Layout (drawingarea.PangoContext);
 		layout.FontDescription = Pango.FontDescription.FromString ("Courier 7");
 
@@ -483,7 +475,6 @@ public class EventExecuteWindow
 		
 			erasePaint(drawingarea);
 			
-			graphProgress = phasesGraph.DOING; 
 			sizeChanged = false;
 		}
 	}
@@ -499,7 +490,6 @@ public class EventExecuteWindow
 			pixmap = new Gdk.Pixmap (drawingarea.GdkWindow, allocation.Width, allocation.Height, -1);
 			erasePaint(drawingarea);
 
-			graphProgress = phasesGraph.DOING; 
 			sizeChanged = false;
 		}
 
@@ -507,7 +497,6 @@ public class EventExecuteWindow
 
 		//sometimes this is called when pait is finished
 		//don't let this erase win
-		//if(graphProgress != phasesGraph.DONE) {
 		if(pixmap != null) {
 			args.Event.Window.DrawDrawable(drawingarea.Style.WhiteGC, pixmap,
 				area.X, area.Y,
@@ -1085,7 +1074,6 @@ public class EventExecuteWindow
 			drawGuideOrAVG(pen_green_discont, eventGraphConfigureWin.GreenGuide, alto, ancho, topMargin, bottomMargin, maxValue, minValue);
 		}
 		
-		graphProgress = phasesGraph.DONE; 
 	}
 
 	private void paintRunSimple (Gtk.DrawingArea drawingarea, Gdk.GC myPen, string [] runs, 
@@ -1137,9 +1125,6 @@ public class EventExecuteWindow
 			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; 
-
 	}
 
 	
@@ -1300,8 +1285,6 @@ public class EventExecuteWindow
 			label_jump_reactive_tf_tc_avg.Text = Util.TrimDecimals((avgTV/avgTC).ToString(), pDN);
 		else
 			label_jump_reactive_tf_tc_avg.Text = "0";
-		
-		graphProgress = phasesGraph.DONE; 
 	}
 
 	private void paintRunInterval (Gtk.DrawingArea drawingarea, bool paintTime, double distance, double distanceTotal, string distancesString, double lastTime, 
@@ -1413,8 +1396,6 @@ public class EventExecuteWindow
 		label_run_interval_time_avg.Text = Util.TrimDecimals(avgTime.ToString(), pDN);
 		label_run_interval_speed_now.Text = Util.TrimDecimals((distance / lastTime).ToString(), pDN);
 		label_run_interval_speed_avg.Text = Util.TrimDecimals((distanceTotal / Util.GetTotalTime(timesString)).ToString(), pDN);
-		
-		graphProgress = phasesGraph.DONE; 
 	}
 
 	private void paintPulse (Gtk.DrawingArea drawingarea, double lastTime, string timesString, double avgTime, int pulses, 
@@ -1470,8 +1451,6 @@ public class EventExecuteWindow
 		
 		label_pulse_now.Text = Util.TrimDecimals(lastTime.ToString(), pDN);
 		label_pulse_avg.Text = Util.TrimDecimals(avgTime.ToString(), pDN);
-		
-		graphProgress = phasesGraph.DONE; 
 	}
 
 	double multiChronopicGetX(int ancho, double time, double timeOld, double timeTotal) {
@@ -1526,7 +1505,6 @@ public class EventExecuteWindow
 		}
 
 		int ancho=drawingarea.Allocation.Width;
-		int alto=drawingarea.Allocation.Height;
 
 		erasePaint(drawingarea);
 
@@ -1555,7 +1533,6 @@ public class EventExecuteWindow
 		paintMultiChronopicDefault (ancho, cp4StartedIn, cp4InStr, cp4OutStr, timeTotal, yCp4Out +10, yCp4Out);
 		Console.Write(" paint4 ");
 
-		graphProgress = phasesGraph.DONE; 
 		Console.Write(" paint done ");
 	}
 
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index db76ef6..d7862c5 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -797,7 +797,7 @@ public class JumpExtraWindow
 	
 	//for RunAnalysis
 	//but will be used and recorded with "fall"
-	static double distance;
+	//static double distance;
 
 	static string option = "Kg";
 	static double limited = 10;
@@ -929,7 +929,7 @@ public class JumpExtraWindow
 		limited = (double) spinbutton_limit.Value;
 		weight = (double) spinbutton_weight.Value;
 		fall = (double) spinbutton_fall.Value;
-		distance = (double) spinbutton_fall.Value;
+		//distance = (double) spinbutton_fall.Value;
 		arms = check_dj_arms.Active;
 		
 		JumpExtraWindowBox.jump_extra.Hide();
diff --git a/src/gui/jumpType.cs b/src/gui/jumpType.cs
index 13ee6aa..9fee13b 100644
--- a/src/gui/jumpType.cs
+++ b/src/gui/jumpType.cs
@@ -54,7 +54,6 @@ public class JumpTypeAddWindow
 
 	static JumpTypeAddWindow JumpTypeAddWindowBox;
 	Gtk.Window parent;
-	ErrorWindow errorWin;
 
 	public bool InsertedSimple;
 
@@ -119,7 +118,7 @@ public class JumpTypeAddWindow
 			string myString = string.Format(Catalog.GetString("Jump type: '{0}' exists. Please, use another name"), Util.RemoveTildeAndColonAndDot(entry_name.Text) );
 			
 			Log.WriteLine (myString);
-			errorWin = ErrorWindow.Show(myString);
+			ErrorWindow.Show(myString);
 		} else {
 			string myJump = "";
 			myJump = Util.RemoveTildeAndColonAndDot(entry_name.Text);
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 19d69f8..ec1f0d8 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -855,7 +855,6 @@ public class PersonAddModifyWindow
 	static PersonAddModifyWindow PersonAddModifyWindowBox;
 	
 	Gtk.Window parent;
-	ErrorWindow errorWin;
 	
 	DialogCalendar myDialogCalendar;
 	DateTime dateTime;
@@ -1257,7 +1256,6 @@ public class PersonAddModifyWindow
 
 
 	private void on_combo_sports_changed(object o, EventArgs args) {
-		ComboBox combo = o as ComboBox;
 		if (o == null)
 			return;
 
@@ -1464,7 +1462,6 @@ public class PersonAddModifyWindow
 				if(myJumpsNormal.Length > 0 || myJumpsReactive.Length > 0) {
 					//create the convertWeight Window
 					convertWeightWin = ConvertWeightWindow.Show(
-							currentSession.UniqueID, currentPerson.UniqueID, 
 							weightIni, (double) spinbutton_weight.Value, 
 							myJumpsNormal, myJumpsReactive);
 					convertWeightWin.Button_accept.Clicked += new EventHandler(on_convertWeightWin_accepted);
@@ -1478,7 +1475,7 @@ public class PersonAddModifyWindow
 		}
 
 		if(errorMessage.Length > 0)
-			errorWin = ErrorWindow.Show(errorMessage);
+			ErrorWindow.Show(errorMessage);
 	}
 
 	void on_convertWeightWin_accepted (object o, EventArgs args) {
@@ -1513,8 +1510,7 @@ public class PersonAddModifyWindow
 					Constants.RaceUndefinedID,
 					Convert.ToInt32(Util.FindOnArray(':', 2, 0, UtilGtk.ComboGetActive(combo_countries), countries)),
 					textview_description.Buffer.Text,
-					Constants.ServerUndefinedID,
-					currentSession.UniqueID);
+					Constants.ServerUndefinedID);
 					
 			currentPersonSession = new PersonSession (
 					currentPerson.UniqueID, currentSession.UniqueID, 
@@ -1642,7 +1638,6 @@ public class PersonAddMultipleWindow {
 	
 	static PersonAddMultipleWindow PersonAddMultipleWindowBox;
 	Gtk.Window parent;
-	ErrorWindow errorWin;
 
 	private Person currentPerson;
 	Session currentSession;
@@ -1782,7 +1777,7 @@ public class PersonAddMultipleWindow {
 		combinedErrorString = readErrorStrings();
 		
 		if (combinedErrorString.Length > 0) {
-			errorWin = ErrorWindow.Show(combinedErrorString);
+			ErrorWindow.Show(combinedErrorString);
 		} else {
 			prepareAllNonBlankRows();
 		
@@ -1864,11 +1859,10 @@ public class PersonAddMultipleWindow {
 				Constants.RaceUndefinedID,
 				Constants.CountryUndefinedID,
 				"", 			//description
-				Constants.ServerUndefinedID,
-				currentSession.UniqueID);
+				Constants.ServerUndefinedID);
 				
 
-		PersonSession ps = new PersonSession (
+		new PersonSession (
 				currentPerson.UniqueID, currentSession.UniqueID, 
 				0, weight, 		//height, weight	
 				currentSession.PersonsSportID,
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 07823ee..08a81cf 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -69,7 +69,7 @@ public class PreferencesWindow {
 
 	//language when window is called. If changes, then change data in sql and show 
 	//dialogMessage
-	private string languageIni;
+	//private string languageIni;
 
 
 	PreferencesWindow () {
@@ -98,7 +98,7 @@ public class PreferencesWindow {
 			PreferencesWindowBox = new PreferencesWindow ();
 		}
 
-		PreferencesWindowBox.languageIni = language;
+		//PreferencesWindowBox.languageIni = language;
 		//if(Util.IsWindows())
 		//	PreferencesWindowBox.createComboLanguage(language);
 		//else 
diff --git a/src/gui/queryServer.cs b/src/gui/queryServer.cs
index c7775fb..c4b4147 100644
--- a/src/gui/queryServer.cs
+++ b/src/gui/queryServer.cs
@@ -528,7 +528,6 @@ public class QueryServerWindow
 
 
 	private void on_combo_sports_changed(object o, EventArgs args) {
-		ComboBox combo = o as ComboBox;
 		if (o == null)
 			return;
 
diff --git a/src/gui/report.cs b/src/gui/report.cs
index d1e7914..9f8c2df 100644
--- a/src/gui/report.cs
+++ b/src/gui/report.cs
@@ -366,7 +366,6 @@ public class ReportWindow {
 			TreeIter iter1; 
 
 			if (treeview1.Selection.GetSelected (out model, out iter1)) {
-				string str=getRow(iter1);
 				store.SetValue (iter1, 8, comment);
 			}
 		}
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 018f158..7cf0910 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -849,7 +849,6 @@ public class RunExtraWindow
 
 	static int distance;
 	static int limited = 10;
-	static bool tracksLimited;
 	
 	static RunExtraWindow RunExtraWindowBox;
 	Gtk.Window parent;
@@ -873,13 +872,11 @@ public class RunExtraWindow
 		if(myRunType.HasIntervals && ! myRunType.Unlimited) {
 			string tracksName = Catalog.GetString("tracks");
 			string secondsName = Catalog.GetString("seconds");
-			if(myRunType.TracksLimited) {
-				tracksLimited = true;
+			if(myRunType.TracksLimited) 
 				RunExtraWindowBox.label_limit_units.Text = tracksName;
-			} else {
-				tracksLimited = false;
+			else 
 				RunExtraWindowBox.label_limit_units.Text = secondsName;
-			}
+			
 			if(myRunType.FixedValue > 0) {
 				RunExtraWindowBox.spinbutton_limit.Sensitive = false;
 				RunExtraWindowBox.spinbutton_limit.Value = myRunType.FixedValue;
diff --git a/src/gui/runType.cs b/src/gui/runType.cs
index c508a52..824885e 100644
--- a/src/gui/runType.cs
+++ b/src/gui/runType.cs
@@ -76,7 +76,6 @@ public class RunTypeAddWindow
 
 	static RunTypeAddWindow RunTypeAddWindowBox;
 	Gtk.Window parent;
-	ErrorWindow errorWin;
 
 	public bool InsertedSimple;
 
@@ -159,7 +158,7 @@ public class RunTypeAddWindow
 			string myString = string.Format(Catalog.GetString("Run type: '{0}' exists. Please, use another name"), 
 					Util.RemoveTildeAndColonAndDot(entry_name.Text) );
 			Log.WriteLine (myString);
-			errorWin = ErrorWindow.Show(myString);
+			ErrorWindow.Show(myString);
 		} else {
 			RunType type = new RunType();
 			type.Name = Util.RemoveTildeAndColonAndDot(entry_name.Text);
diff --git a/src/gui/session.cs b/src/gui/session.cs
index 8bfc8f8..2b4396b 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -59,8 +59,6 @@ public class SessionAddEditWindow {
 	
 	[Widget] Gtk.Label label_persons_data;
 
-	ErrorWindow errorWin;
-
 	DialogCalendar myDialogCalendar;
 	DateTime dateTime;
 
@@ -353,7 +351,6 @@ public class SessionAddEditWindow {
 	}
 	
 	private void on_combo_sports_changed(object o, EventArgs args) {
-		ComboBox combo = o as ComboBox;
 		if (o == null)
 			return;
 
@@ -568,7 +565,7 @@ public class SessionAddEditWindow {
 		bool sessionNameExists = Sqlite.Exists (Constants.SessionTable, Util.RemoveTildeAndColon(entry_name.Text));
 		if(sessionNameExists && Util.RemoveTildeAndColon(entry_name.Text) != currentSession.Name ) {
 			string myString = string.Format(Catalog.GetString("Session: '{0}' exists. Please, use another name"), Util.RemoveTildeAndColonAndDot(entry_name.Text) );
-			errorWin = ErrorWindow.Show(myString);
+			ErrorWindow.Show(myString);
 		} else {
 			int sportID;
 			if(radiobutton_diff_sports.Active)
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index 5e9650a..9d05afd 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -111,7 +111,6 @@ public class StatsWindow {
 	bool statsAutomatic = false;
 	bool statsColumnsToRemove = false;
 	private Session currentSession;
-	bool changingCombos = false;
 	//selected sessions
 	ArrayList selectedSessions;
 	
diff --git a/src/log.cs b/src/log.cs
index 08f39b7..cdce4e2 100644
--- a/src/log.cs
+++ b/src/log.cs
@@ -30,7 +30,7 @@ public class Log
 	 */
 	
 	//private static TextWriter writer; //writer is not used now, all is thone in the Main (on chronojump.cs).we only need to print to console now (0.7.5)
-	private static string timeLog = "";
+	//private static string timeLog = "";
 	private static bool useConsole = true; //for the new method on chronojump.cs for redirecting output and error to same file also on windows (0.7.5)
 				
 	/*
diff --git a/src/multiChronopic.cs b/src/multiChronopic.cs
index c6caafa..1a0488e 100644
--- a/src/multiChronopic.cs
+++ b/src/multiChronopic.cs
@@ -146,7 +146,6 @@ public class MultiChronopic : Event
 		string [] cp2OutFull = this.Cp2OutStr.Split(new char[] {'='});
 
 		double avgSpeed = GetAVGSpeedRunA();
-		bool success = false;
 						
 		for(int lineCount=0; lineCount < cp2InFull.Length; lineCount++) {
 			int count=0;
diff --git a/src/person.cs b/src/person.cs
index 12f8420..5f5ca08 100644
--- a/src/person.cs
+++ b/src/person.cs
@@ -34,8 +34,6 @@ public partial class Person {
 	private string description;
 	private int serverUniqueID; //not on server
 
-	private int sessionID;
-	
 	public Person() {
 	}
 	
@@ -68,7 +66,7 @@ public partial class Person {
 	//used when we create new person 
 	//we don't know uniqueID
 	public Person(string name, string sex, DateTime dateBorn, int race, int countryID, string description,
-			int serverUniqueID, int sessionID) 
+			int serverUniqueID) 
 	{
 		name = Util.RemoveTildeAndColon(name);
 		description = Util.RemoveTildeAndColon(description);
@@ -80,7 +78,6 @@ public partial class Person {
 		this.countryID = countryID;
 		this.description = description;
 		this.serverUniqueID = serverUniqueID; //remember don't do this on server
-		this.sessionID = sessionID;
 
 		//insert in the person table
 		//when insert as person we don't know uniqueID
@@ -91,9 +88,6 @@ public partial class Person {
 		uniqueID = insertedID;
 
 		Log.WriteLine(this.ToString());
-
-		//insert in the personSession table (fast way of knowing who was in each session)
-		//SqlitePersonSession.Insert (false, Constants.PersonSessionWeightTable, "-1", uniqueID, sessionID, weight);
 	}
 	
 	public int InsertAtDB (bool dbconOpened, string tableName) {
diff --git a/src/sqlite/personSession.cs b/src/sqlite/personSession.cs
index 4018047..3b600ec 100644
--- a/src/sqlite/personSession.cs
+++ b/src/sqlite/personSession.cs
@@ -205,8 +205,6 @@ class SqlitePersonSession : Sqlite
 		SqliteDataReader reader;
 		reader = dbcmd.ExecuteReader();
 	
-		string [] values = new string[12];
-
 		PersonSession ps = new PersonSession();
 		while(reader.Read()) {
 			ps = new PersonSession(
diff --git a/src/statType.cs b/src/statType.cs
index be7c993..f0de7cd 100644
--- a/src/statType.cs
+++ b/src/statType.cs
@@ -69,20 +69,11 @@ public class StatType {
 	string statisticSubType;
 	string statisticApplyTo;
 	Gtk.TreeView treeview_stats;
-	ArrayList sendSelectedSessions;
-	int prefsDigitsNumber;
-	bool sex_active;
-	int statsJumpsType;
-	int limit;
-	bool heightPreferred;
-	bool weightStatsPercent;
 	int rj_evolution_mark_consecutives;
 	
 	ArrayList markedRows;
 	ArrayList personsWithData;
 
-	GraphROptions gRO;
-	
 	bool graph;
 	bool toReport;
 	TextWriter writer;
@@ -95,7 +86,6 @@ public class StatType {
 	Gtk.TreeStore lastStore; 
 	
 	Stat myStat; 
-	//Report myReport; 
 
 	StatTypeStruct myStatTypeStruct;
 	
@@ -125,20 +115,11 @@ public class StatType {
 		this.statisticSubType = statisticSubType;
 		this.statisticApplyTo = statisticApplyTo;
 		this.treeview_stats = treeview_stats ;
-		this.sendSelectedSessions =  sendSelectedSessions;
-		this.prefsDigitsNumber =  prefsDigitsNumber;
-		this.sex_active = sex_active;
-		this.statsJumpsType = statsJumpsType;
-		this.limit = limit;
-		this.heightPreferred = heightPreferred;
-		this.weightStatsPercent = weightStatsPercent;
 
 		this.markedRows = markedRows;
 		
 		this.rj_evolution_mark_consecutives = rj_evolution_mark_consecutives;
 		
-		this.gRO = gRO;
-		
 		this.graph = graph;
 		this.toReport = toReport;
 
@@ -189,20 +170,11 @@ public class StatType {
 		this.statisticType = statisticType;
 		this.statisticSubType = statisticSubType;
 		this.statisticApplyTo = statisticApplyTo;
-		this.sendSelectedSessions =  sendSelectedSessions;
-		this.prefsDigitsNumber =  prefsDigitsNumber;
-		this.sex_active = sex_active;
-		this.statsJumpsType = statsJumpsType;
-		this.limit = limit;
-		this.heightPreferred = heightPreferred;
-		this.weightStatsPercent = weightStatsPercent;
 
 		this.markedRows = markedRows;
 		
 		this.rj_evolution_mark_consecutives = rj_evolution_mark_consecutives;
 		
-		this.gRO = gRO;
-		
 		this.graph = graph;
 		this.toReport = toReport;
 		this.writer = writer;
diff --git a/src/stats/graphs/ieIub.cs b/src/stats/graphs/ieIub.cs
index f5afd30..45fd3ac 100644
--- a/src/stats/graphs/ieIub.cs
+++ b/src/stats/graphs/ieIub.cs
@@ -30,7 +30,6 @@ using Mono.Unix;
 public class GraphIeIub : StatIeIub
 {
 	protected string operation;
-	private Random myRand = new Random();
 
 	//for simplesession
 	GraphSerie serieIndex;
diff --git a/src/stats/main.cs b/src/stats/main.cs
index 5a7206a..5dcfc72 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -1004,7 +1004,6 @@ public class Stat
 		string bD = "data <- cbind("; //bindDataString
 		string colNamesD = "colnames(data) <- c("; //colNamesDataString
 		string sepSerie = "";
-		string xyFirstFound = "";
 		int count = 0; //this counts accepted series
 		int countSeries = 0; //for RJ
 		int countAcceptedCols=0;
diff --git a/src/stats/rjAVGSD.cs b/src/stats/rjAVGSD.cs
index af91b9e..8f19793 100644
--- a/src/stats/rjAVGSD.cs
+++ b/src/stats/rjAVGSD.cs
@@ -79,7 +79,6 @@ public class StatRjAVGSD : Stat
 		*/
 
 		string operation = ""; // cannot be avg in this statistic
-		int myDataCols = 0;
 		int maxJumps = SqliteStat.ObtainMaxNumberOfJumps(sessionString);
 		
 		processDataSimpleSession ( 
diff --git a/src/treeViewEvent.cs b/src/treeViewEvent.cs
index 24f677f..19dda0d 100644
--- a/src/treeViewEvent.cs
+++ b/src/treeViewEvent.cs
@@ -332,8 +332,7 @@ public class TreeViewEvent
 				} while (treeview.Model.IterNext (ref iter));
 					
 				iter= iterValid;
-				//bool ok=treeview.Model.IterParent (out iter, iter);
-				bool ok=treeview.Model.IterParent (out iter, iter);
+				treeview.Model.IterParent (out iter, iter);
 			}
 		} while (treeview.Model.IterNext (ref iter));
 	}
diff --git a/src/treeViewMultiChronopic.cs b/src/treeViewMultiChronopic.cs
index 3c05f61..a8c3d5f 100644
--- a/src/treeViewMultiChronopic.cs
+++ b/src/treeViewMultiChronopic.cs
@@ -216,15 +216,6 @@ public class TreeViewMultiChronopic : TreeViewEvent
 		//write line for treeview
 		string [] myData = new String [19+1];
 
-		string [] cp1InFull = mc.Cp1InStr.Split(new char[] {'='});
-		string [] cp1OutFull = mc.Cp1OutStr.Split(new char[] {'='});
-		string [] cp2InFull = mc.Cp2InStr.Split(new char[] {'='});
-		string [] cp2OutFull = mc.Cp2OutStr.Split(new char[] {'='});
-		string [] cp3InFull = mc.Cp3InStr.Split(new char[] {'='});
-		string [] cp3OutFull = mc.Cp3OutStr.Split(new char[] {'='});
-		string [] cp4InFull = mc.Cp4InStr.Split(new char[] {'='});
-		string [] cp4OutFull = mc.Cp4OutStr.Split(new char[] {'='});
-
 		if(mc.Type == Constants.RunAnalysisName) {
 			if(lineCount == 0) {
 				int count = 0;



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