chronojump r451 - in trunk: . src src/gui src/sqlite



Author: xaviblas
Date: Tue Feb  3 21:44:59 2009
New Revision: 451
URL: http://svn.gnome.org/viewvc/chronojump?rev=451&view=rev

Log:
small code cleaning


Modified:
   trunk/changelog.txt
   trunk/src/event.cs
   trunk/src/gui/chronojump.cs
   trunk/src/jumpType.cs
   trunk/src/person.cs
   trunk/src/serverEvaluator.cs
   trunk/src/serverPing.cs
   trunk/src/session.cs
   trunk/src/sport.cs
   trunk/src/sqlite/session.cs

Modified: trunk/changelog.txt
==============================================================================
--- trunk/changelog.txt	(original)
+++ trunk/changelog.txt	Tue Feb  3 21:44:59 2009
@@ -24,6 +24,9 @@
 -stats (graphs)
 
 
+3 feb 2009 (2)
+	small code cleaning
+
 3 feb 2009
 	0.8.1.7
 	Web service compiles again: see new howto_server_2009.txt

Modified: trunk/src/event.cs
==============================================================================
--- trunk/src/event.cs	(original)
+++ trunk/src/event.cs	Tue Feb  3 21:44:59 2009
@@ -48,10 +48,6 @@
 		return -1;
 	}	
 	
-	/*
-	 * defined on webservice
-	 *
-	 */
 	public string Type
 	{
 		get { return type; }

Modified: trunk/src/gui/chronojump.cs
==============================================================================
--- trunk/src/gui/chronojump.cs	(original)
+++ trunk/src/gui/chronojump.cs	Tue Feb  3 21:44:59 2009
@@ -922,12 +922,10 @@
 		try {
 			ChronojumpServer myServer = new ChronojumpServer();
 			Log.WriteLine(myServer.ConnectDatabase());
-//			ArrayList stats = (ArrayList) myServer.Stats();
 			string stats = myServer.Stats();
 			Log.WriteLine(myServer.DisConnectDatabase());
 
 			new DialogMessage(Constants.MessageTypes.INFO, "Stats in server:\n" + 
-//					Util.ArrayListToSingleString(stats) + "\n" + Util.DateParse(DateTime.Now.ToString()));
 					stats + "\n" + Util.DateParse(DateTime.Now.ToString()));
 		} catch {
 			new DialogMessage(Constants.MessageTypes.WARNING, Constants.ServerOffline);

Modified: trunk/src/jumpType.cs
==============================================================================
--- trunk/src/jumpType.cs	(original)
+++ trunk/src/jumpType.cs	Tue Feb  3 21:44:59 2009
@@ -59,7 +59,6 @@
 		this.name = name;
 		
 		//we cannot obtain values like has Weight
-//		this.isPredefined = false;
 		
 		unlimited = false;	//default value
 		imageFileName = "";
@@ -71,7 +70,6 @@
 			isRepetitive 	= false;
 			jumpsLimited 	= false;
 			fixedValue 	= 0;
-//			isPredefined	= true;
 			if(name == "Free") {
 				imageFileName = "jump_free.png";
 				description	= Catalog.GetString("Free Jump");
@@ -105,7 +103,6 @@
 			isRepetitive 	= false;
 			jumpsLimited 	= false;
 			fixedValue 	= 0;
-//			isPredefined	= true;
 			if(name == "SJl") {
 				description	= Catalog.GetString("Squat Jump with extra weight");
 				imageFileName = "jump_sj_l.png";
@@ -122,7 +119,6 @@
 			isRepetitive 	= false;
 			jumpsLimited 	= false;
 			fixedValue 	= 0;
-//			isPredefined	= true;
 			description	= Catalog.GetString("DJ Jump");
 			imageFileName = "jump_dj.png";
 		} else if(name == "RJ(j)") {
@@ -131,7 +127,6 @@
 			isRepetitive 	= true;
 			jumpsLimited 	= true;
 			fixedValue 	= 0;
-//			isPredefined	= true;
 			imageFileName = "jump_rj.png";
 			description	= Catalog.GetString("Reactive Jump limited by Jumps");
 			longDescription	= "";
@@ -141,7 +136,6 @@
 			isRepetitive 	= true;
 			jumpsLimited 	= false;
 			fixedValue 	= 0;
-//			isPredefined	= true;
 			description	= Catalog.GetString("Reactive Jump limited by Time");
 			imageFileName = "jump_rj.png";
 		} else if(name == "RJ(unlimited)") {
@@ -150,7 +144,6 @@
 			isRepetitive 	= true;
 			jumpsLimited 	= true;	//will finish in a concrete jump, not in a concrete second
 			fixedValue 	= -1;	//don't ask for limit of jumps or seconds
-//			isPredefined	= true;
 			unlimited 	= true;
 			description	= Catalog.GetString("Reactive Jump unlimited (until finish button is clicked)");
 			imageFileName = "jump_rj_in.png";
@@ -160,7 +153,6 @@
 			isRepetitive 	= true;
 			jumpsLimited 	= true;	//will finish in a concrete jump, not in a concrete second
 			fixedValue 	= 18;	//don't ask for limit of jumps or seconds
-//			isPredefined	= true;
 			unlimited 	= false;
 			description	= Catalog.GetString("Reactive Jump on a hexagon until three full revolutions are done");
 			imageFileName = "jump_rj_hexagon.png";
@@ -170,7 +162,6 @@
 			isRepetitive 	= true;
 			jumpsLimited 	= true;
 			fixedValue 	= 3;
-//			isPredefined	= true;
 			description	= Catalog.GetString("Triple jump");
 			imageFileName = "jump_rj.png";
 		}
@@ -194,7 +185,6 @@
 		this.imageFileName = imageFileName;
 
 		//we can obtain values like has Weight
-//		this.isPredefined	= true;
 		isPredefined = FindIfIsPredefined();
 	}
 

Modified: trunk/src/person.cs
==============================================================================
--- trunk/src/person.cs	(original)
+++ trunk/src/person.cs	Tue Feb  3 21:44:59 2009
@@ -156,9 +156,7 @@
 		return this.ToString().GetHashCode();
 	}
 	
-	/*
-	 * defined on webservice
-	 */
+	
 	public string Name {
 		get { return name; }
 		set { name = value; }

Modified: trunk/src/serverEvaluator.cs
==============================================================================
--- trunk/src/serverEvaluator.cs	(original)
+++ trunk/src/serverEvaluator.cs	Tue Feb  3 21:44:59 2009
@@ -58,10 +58,6 @@
 			"; CountryID: " + countryID + "; Confiable: " + confiable;
 	}
 	
-	/*
-	 * defined on webservice
-	 *
-	 */
 	public int UniqueID {
 		get { return uniqueID; }
 		set { uniqueID = value; }

Modified: trunk/src/serverPing.cs
==============================================================================
--- trunk/src/serverPing.cs	(original)
+++ trunk/src/serverPing.cs	Tue Feb  3 21:44:59 2009
@@ -57,10 +57,6 @@
 			"\nIP: " + ip + "\nDate: " + date;
 	}
 	
-	/*
-	 * defined on webservice
-	 *
-	 */
 	public int UniqueID {
 		get { return uniqueID; }
 		set { uniqueID = value; }

Modified: trunk/src/session.cs
==============================================================================
--- trunk/src/session.cs	(original)
+++ trunk/src/session.cs	Tue Feb  3 21:44:59 2009
@@ -134,10 +134,7 @@
 		return this.ToString().GetHashCode();
 	}
 	
-	/*
-	 * defined on webservice
-	 *
-	 * */
+	
 	public string Name { 
 		get { return name; } 
 		set { name = value; } 
@@ -257,9 +254,6 @@
 			evaluatorCJVersion + ", " + evaluatorOS + ", " + uploadedDate + ", " + uploadingState;
 	}
 	
-	/*
-	 * defined on webservice
-	 */
 	public int EvaluatorID {
 		get { return evaluatorID; }
 		set { evaluatorID = value; }

Modified: trunk/src/sport.cs
==============================================================================
--- trunk/src/sport.cs	(original)
+++ trunk/src/sport.cs	Tue Feb  3 21:44:59 2009
@@ -70,9 +70,6 @@
 		return myString + Catalog.GetString(name);
 	}
 
-	/*
-	 * defined on webservice
-	 */
 	public int UniqueID {
 		get { return uniqueID; } 
 		set { uniqueID = value; } 

Modified: trunk/src/sqlite/session.cs
==============================================================================
--- trunk/src/sqlite/session.cs	(original)
+++ trunk/src/sqlite/session.cs	Tue Feb  3 21:44:59 2009
@@ -616,8 +616,6 @@
 		dbcmd.ExecuteNonQuery();
 	}
 	
-	//public static int Insert(bool dbconOpened, string tableName, string uniqueID, string name, string place, string date, int personsSportID, int personsSpeciallityID, int personsPractice, string comments, int serverUniqueID, int evaluatorID, string evaluatorCJVersion, string evaluatorOS, string uploadedDate, Constants.ServerSessionStates uploadingState)
-	//public static int Insert(bool dbconOpened, string tableName, string name, string place, string date, int personsSportID, int personsSpeciallityID, int personsPractice, string comments, int serverUniqueID, int evaluatorID, string evaluatorCJVersion, string evaluatorOS, string uploadedDate, Constants.ServerSessionStates uploadingState)
 	public static int Insert(bool dbconOpened, string tableName, string name, string place, string date, int personsSportID, int personsSpeciallityID, int personsPractice, string comments, int serverUniqueID, int evaluatorID, string evaluatorCJVersion, string evaluatorOS, string uploadedDate, int uploadingState)
 	{
 		if(! dbconOpened)
@@ -634,7 +632,6 @@
 			personsPractice + ", '" + comments + "', " +
 			serverUniqueID + ", " + evaluatorID + ", '" +
 			evaluatorCJVersion + "', '" + evaluatorOS + "', '" +
-			//uploadedDate + "', " + Convert.ToInt32(uploadingState) +
 			uploadedDate + "', " + uploadingState +
 			")" ;
 		Log.WriteLine(dbcmd.CommandText.ToString());
@@ -648,13 +645,11 @@
 	}
 	
 	//updating local session when it gets uploaded
-	//public static void UpdateUploadingState(int uniqueID, Constants.ServerSessionStates state)
 	public static void UpdateUploadingState(int uniqueID, int state)
 	{
 		//if(!dbconOpened)
 			dbcon.Open();
 
-		//dbcmd.CommandText = "UPDATE " + Constants.SessionTable + " SET uploadingState = " + Convert.ToInt32(state) + 
 		dbcmd.CommandText = "UPDATE " + Constants.SessionTable + " SET uploadingState = " + state + 
 			" WHERE uniqueID == " + uniqueID ;
 		Log.WriteLine(dbcmd.CommandText.ToString());



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