[chronojump/database-refactoring: 4/5] More refactoring, now it compiles.



commit d220af60301c0316d442f76f8b159e13d56bc80d
Author: Carles Pina i Estany <carles pina cat>
Date:   Mon Sep 12 22:47:19 2016 +0100

    More refactoring, now it compiles.

 src/chronojump.cs                                  |   12 +-
 src/gui/queryServer.cs                             |    2 +-
 src/gui/run.cs                                     |   12 +-
 src/gui/runType.cs                                 |    6 +-
 src/gui/session.cs                                 |   10 +-
 src/gui/usefulObjects.cs                           |    4 +-
 src/oldCodeNeedToDBConvert/person.cs               |    4 +-
 src/oldCodeNeedToDBConvert/personSession.cs        |    2 +-
 src/oldCodeNeedToDBConvert/sqlite/person.cs        |    2 +-
 src/oldCodeNeedToDBConvert/sqlite/personSession.cs |    4 +-
 src/oldCodeNeedToDBConvert/sqlite/session.cs       |    8 +-
 src/server.cs                                      |   16 +-
 src/sqlite/country.cs                              |    2 +-
 src/sqlite/encoder.cs                              |    2 +-
 src/sqlite/jumpType.cs                             |   30 ++--
 src/sqlite/main.cs                                 |  215 +++++++++++++-------
 src/sqlite/oldConvert.cs                           |    8 +-
 src/sqlite/personSession.cs                        |    6 +-
 src/sqlite/preferences.cs                          |   18 +-
 src/sqlite/session.cs                              |    6 +-
 src/sqlite/speciallity.cs                          |    4 +-
 src/stats/djIndex.cs                               |    8 +-
 src/stats/djPower.cs                               |    8 +-
 src/stats/djQ.cs                                   |    8 +-
 src/stats/fv.cs                                    |    8 +-
 src/stats/graphs/rjEvolution.cs                    |    2 +-
 src/stats/graphs/runIntervallic.cs                 |    2 +-
 src/stats/jumpSimpleSubtraction.cs                 |    8 +-
 src/stats/potency.cs                               |    8 +-
 src/stats/rjAVGSD.cs                               |    4 +-
 src/stats/rjEvolution.cs                           |    4 +-
 src/stats/rjPotencyBosco.cs                        |    8 +-
 src/stats/runIntervallic.cs                        |    4 +-
 src/stats/runSimple.cs                             |    8 +-
 src/stats/sjCmjAbk.cs                              |    8 +-
 src/stats/sjCmjAbkPlus.cs                          |    8 +-
 36 files changed, 269 insertions(+), 200 deletions(-)
---
diff --git a/src/chronojump.cs b/src/chronojump.cs
index 3e476b3..cf6e325 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -68,7 +68,9 @@ public class ChronoJump
                Log.WriteLine(string.Format("Client database option 1 in ... " + Util.GetDatabaseDir()));
                Log.WriteLine(string.Format("Client database option 2 in ... " + Util.GetDatabaseTempDir()));
                */
-               
+
+               SqliteGeneral sqliteGeneral = new SqliteGeneral();
+
                LogSync.Initialize();
                //1.4.10
                Log.Start();
@@ -179,11 +181,12 @@ public class ChronoJump
 #if OSTYPE_WINDOWS
                                g_setenv ("LANGUAGE", language, true);
 #endif
-                       }
+                       }
                }
                catch {
                        LogB.Warning("Problem reading language on start");
-               }
+               }
+               sqliteGeneral.GetType();
        }
 
        Catalog.Init("chronojump",System.IO.Path.Combine(Util.GetPrefixDir(),"share/locale"));
@@ -425,7 +428,8 @@ public class ChronoJump
                //while(! pingEnd) {
                //}
 
-               SqliteGeneral.Sqlite.Open();
+               SqliteGeneral.Sqlite.Open();
+               SqliteGeneral.SqlitePreferences.Open();
 
                string versionAvailableKnown = SqliteGeneral.SqlitePreferences.Select("versionAvailable", 
true);
                if( versionAvailable != Constants.ServerOffline && new Version(versionAvailable) > new 
Version(progVersion) ) {
diff --git a/src/gui/queryServer.cs b/src/gui/queryServer.cs
index fce462a..fdf7de3 100644
--- a/src/gui/queryServer.cs
+++ b/src/gui/queryServer.cs
@@ -717,7 +717,7 @@ public class QueryServerWindow
                }
                
                try {
-                       string sqlString = Sqlite.SQLBuildQueryString(
+                       string sqlString = SqliteGeneral.Sqlite.SQLBuildQueryString(
                                        tableName, 
                                        UtilGtk.ComboGetActive(combo_tests),
                                        strVariable,
diff --git a/src/gui/run.cs b/src/gui/run.cs
index ebf8ea5..3c74733 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -486,7 +486,7 @@ public class EditRunIntervalWindow : EditRunWindow
                combo_eventType.Sensitive=false;
 
                string [] myTypes;
-               myTypes = SqliteRunIntervalType.SelectRunIntervalTypes("", true); //don't show allRunsName 
row, only select name
+               myTypes = SqliteGeneral.SqliteRunIntervalType.SelectRunIntervalTypes("", true); //don't show 
allRunsName row, only select name
                return myTypes;
        }
        
@@ -599,7 +599,7 @@ public class RepairRunIntervalWindow
                label_header.Text = string.Format(Catalog.GetString("Use this window to repair this 
test.\nDouble clic any cell to edit it (decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
        
                
-               type = SqliteRunIntervalType.SelectAndReturnRunIntervalType(myRun.Type, false);
+               type = SqliteGeneral.SqliteRunIntervalType.SelectAndReturnRunIntervalType(myRun.Type, false);
                
                TextBuffer tb = new TextBuffer (new TextTagTable());
                tb.Text = createTextForTextView(type);
@@ -841,7 +841,7 @@ public class RepairRunIntervalWindow
                }
 
                //save it deleting the old first for having the same uniqueID
-               Sqlite.Delete(false, Constants.RunIntervalTable, runInterval.UniqueID);
+               SqliteGeneral.Sqlite.Delete(false, Constants.RunIntervalTable, runInterval.UniqueID);
                runInterval.InsertAtDB(false, Constants.RunIntervalTable); 
                /*
                SqliteGeneral.SqliteRun.InsertInterval(false, Constants.RunIntervalTable, 
runInterval.UniqueID.ToString(), 
@@ -1278,7 +1278,7 @@ public class RunsMoreWindow : EventMoreWindow
        }
        
        protected override void deleteTestLine() {
-               SqliteRunType.Delete(selectedEventName);
+               SqliteGeneral.SqliteRunType.Delete(selectedEventName);
                
                //delete from typesTranslated
                string row = Util.FindOnArray(':',0, -1, selectedEventName, typesTranslated);
@@ -1381,7 +1381,7 @@ public class RunsIntervalMoreWindow : EventMoreWindow
        protected override void fillTreeView (Gtk.TreeView tv, TreeStore store) 
        {
                //select data without inserting an "all jumps", and not obtain only name of jump
-               string [] myTypes = SqliteRunIntervalType.SelectRunIntervalTypes("", false);
+               string [] myTypes = SqliteGeneral.SqliteRunIntervalType.SelectRunIntervalTypes("", false);
                
                //remove typesTranslated
                typesTranslated = new String [myTypes.Length];
@@ -1544,7 +1544,7 @@ public class RunsIntervalMoreWindow : EventMoreWindow
        }
        
        protected override void deleteTestLine() {
-               SqliteRunIntervalType.Delete(selectedEventName);
+               SqliteGeneral.SqliteRunIntervalType.Delete(selectedEventName);
                
                //delete from typesTranslated
                string row = Util.FindOnArray(':',0, -1, selectedEventName, typesTranslated);
diff --git a/src/gui/runType.cs b/src/gui/runType.cs
index 25cb137..63c29b2 100644
--- a/src/gui/runType.cs
+++ b/src/gui/runType.cs
@@ -168,7 +168,7 @@ public class RunTypeAddWindow
                name = Util.RemoveChar(name, '"');
 
                //check if this run type exists, and check it's name is not AllRunsName
-               bool runTypeExists = Sqlite.Exists (false, Constants.RunTypeTable, name);
+               bool runTypeExists = SqliteGeneral.Sqlite.Exists (false, Constants.RunTypeTable, name);
                if(name == Constants.AllRunsName)
                        runTypeExists = true;
                
@@ -192,7 +192,7 @@ public class RunTypeAddWindow
                        }
                        
                        if(radiobutton_simple.Active) {
-                               SqliteRunType.Insert(type, Constants.RunTypeTable, false); //false, because 
dbcon is not opened
+                               SqliteGeneral.SqliteRunType.Insert(type, Constants.RunTypeTable, false); 
//false, because dbcon is not opened
                                InsertedSimple = true;
                        }
                        else {
@@ -214,7 +214,7 @@ public class RunTypeAddWindow
                                        type.Unlimited = false; 
                                }
                        
-                               SqliteRunIntervalType.Insert(type, Constants.RunIntervalTypeTable, false); 
//false, because dbcon is not opened
+                               SqliteGeneral.SqliteRunIntervalType.Insert(type, 
Constants.RunIntervalTypeTable, false); //false, because dbcon is not opened
                                InsertedSimple = false;
                        }
                        
diff --git a/src/gui/session.cs b/src/gui/session.cs
index a43423b..886e3c2 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -156,7 +156,7 @@ public class SessionAddEditWindow {
                                if(currentSession.PersonsSpeciallityID != Constants.SpeciallityUndefinedID) { 
                                        radiobutton_same_speciallity.Active = true;
                                        combo_speciallities.Active = 
UtilGtk.ComboMakeActive(speciallitiesTranslated,
-                                                      SqliteSpeciallity.Select(false, 
currentSession.PersonsSpeciallityID));
+                                                      SqliteGeneral.SqliteSpeciallity.Select(false, 
currentSession.PersonsSpeciallityID));
                                                       
                                } else 
                                        combo_speciallities.Active = 
@@ -308,7 +308,7 @@ public class SessionAddEditWindow {
        
        private void createComboSpeciallities(int sportID) {
                combo_speciallities = ComboBox.NewText ();
-               speciallities = SqliteSpeciallity.SelectAll(true, sportID); //show undefined, filter by sport
+               speciallities = SqliteGeneral.SqliteSpeciallity.SelectAll(true, sportID); //show undefined, 
filter by sport
 
                //create speciallities translated, only with translated stuff
                speciallitiesTranslated = new String[speciallities.Length];
@@ -568,7 +568,7 @@ public class SessionAddEditWindow {
                string name = Util.RemoveTildeAndColon(entry_name.Text);
                name = Util.RemoveChar(name, '"');
 
-               bool sessionNameExists = Sqlite.Exists (false, Constants.SessionTable, name);
+               bool sessionNameExists = SqliteGeneral.Sqlite.Exists (false, Constants.SessionTable, name);
                if(sessionNameExists && name != currentSession.Name ) {
                        string myString = string.Format(Catalog.GetString("Session: '{0}' exists. Please, use 
another name"), name);
                        ErrorWindow.Show(myString);
@@ -612,7 +612,7 @@ public class SessionAddEditWindow {
                                currentSession.PersonsPractice = levelID;
                                currentSession.Comments = comments;
 
-                               SqliteSession.Update(currentSession.UniqueID, currentSession.Name, 
+                               SqliteGeneral.SqliteSession.Update(currentSession.UniqueID, 
currentSession.Name, 
                                                currentSession.Place, currentSession.Date, 
                                                sportID, speciallityID, levelID,
                                                currentSession.Comments);
@@ -1015,7 +1015,7 @@ public class SessionSelectStatsWindow {
                bool commentsDisable = false;
                int sessionIdDisable = -1; //don't disable any session (-1 as uniqueID is impossible)
                string [] mySessions = 
-                       SqliteSession.SelectAllSessionsSimple(commentsDisable, sessionIdDisable);
+                       SqliteGeneral.SqliteSession.SelectAllSessionsSimple(commentsDisable, 
sessionIdDisable);
 
                foreach (string session in mySessions) {
                        string [] myStringFull = session.Split(new char[] {':'});
diff --git a/src/gui/usefulObjects.cs b/src/gui/usefulObjects.cs
index 5efb634..54b3ef0 100644
--- a/src/gui/usefulObjects.cs
+++ b/src/gui/usefulObjects.cs
@@ -150,7 +150,7 @@ public class PrepareEventGraphRunSimple {
                
                //obtain data
                runsAtSQL = SqliteGeneral.SqliteRun.SelectRuns(true, sessionID, personID, type,
-                               SqliteGeneral.Sqlite.Orders_by.ID_DESC, 10); //select only last 10
+                               Sqlite.Orders_by.ID_DESC, 10); //select only last 10
 
                
                string sqlSelect = "distance/time";
@@ -238,7 +238,7 @@ public class PrepareEventGraphReactionTime {
 
                //obtain data
                rtsAtSQL = SqliteGeneral.SqliteReactionTime.SelectReactionTimes(true, sessionID, personID, 
type,
-                               SqliteGeneral.Sqlite.Orders_by.ID_DESC, 10); //select only last 10
+                               Sqlite.Orders_by.ID_DESC, 10); //select only last 10
                
                personMAXAtSQL = SqliteGeneral.SqliteSession.SelectMAXEventsOfAType(
                                true, sessionID, personID, table, type, "time");
diff --git a/src/oldCodeNeedToDBConvert/person.cs b/src/oldCodeNeedToDBConvert/person.cs
index 6c78461..4881bfa 100644
--- a/src/oldCodeNeedToDBConvert/person.cs
+++ b/src/oldCodeNeedToDBConvert/person.cs
@@ -103,7 +103,7 @@ public partial class PersonOld {
                LogB.Information(this.ToString());
 
                //insert in the personSession table (fast way of knowing who was in each session)
-               SqlitePersonSessionOld.Insert (false, Constants.PersonSessionOldWeightTable, "-1", uniqueID, 
sessionID, weight);
+               SqliteGeneral.SqlitePersonSessionOld.Insert (false, Constants.PersonSessionOldWeightTable, 
"-1", uniqueID, sessionID, weight);
        }
        
        //used to select a person at Sqlite.convertTables
@@ -125,7 +125,7 @@ public partial class PersonOld {
        }
 
        public int InsertAtDB (bool dbconOpened, string tableName) {
-               int myID = SqlitePersonOld.Insert(dbconOpened, tableName, 
+               int myID = SqliteGeneral.SqlitePersonOld.Insert(dbconOpened, tableName, 
                                uniqueID.ToString(), name,
                                sex, dateBorn, height, -1, //person weight is '-1', weight is in 
personSessionWeight table
                                sportID, speciallityID, practice,
diff --git a/src/oldCodeNeedToDBConvert/personSession.cs b/src/oldCodeNeedToDBConvert/personSession.cs
index a0ca2e9..33d1967 100644
--- a/src/oldCodeNeedToDBConvert/personSession.cs
+++ b/src/oldCodeNeedToDBConvert/personSession.cs
@@ -71,7 +71,7 @@ public partial class PersonSessionOld {
        }
 
        public int InsertAtDB (bool dbconOpened, string tableName) {
-               int myID = SqlitePersonSessionOld.Insert(dbconOpened, tableName, 
+               int myID = SqliteGeneral.SqlitePersonSessionOld.Insert(dbconOpened, tableName, 
                                uniqueID.ToString(),
                                personID, sessionID, weight);
                return myID;
diff --git a/src/oldCodeNeedToDBConvert/sqlite/person.cs b/src/oldCodeNeedToDBConvert/sqlite/person.cs
index faa01e8..7891d59 100644
--- a/src/oldCodeNeedToDBConvert/sqlite/person.cs
+++ b/src/oldCodeNeedToDBConvert/sqlite/person.cs
@@ -25,7 +25,7 @@ using System.Collections; //ArrayList
 using Mono.Data.Sqlite;
 
 
-class SqlitePersonOld : Sqlite
+public class SqlitePersonOld : Sqlite
 {
        public SqlitePersonOld() {
        }
diff --git a/src/oldCodeNeedToDBConvert/sqlite/personSession.cs 
b/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
index 9ae251f..8992876 100644
--- a/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
+++ b/src/oldCodeNeedToDBConvert/sqlite/personSession.cs
@@ -26,7 +26,7 @@ using Mono.Data.Sqlite;
 using Mono.Unix;
 
 
-class SqlitePersonSessionOld : Sqlite
+public class SqlitePersonSessionOld : Sqlite
 {
        public SqlitePersonSessionOld() {
        }
@@ -153,7 +153,7 @@ class SqlitePersonSessionOld : Sqlite
         * conversion from database 0.52 to 0.53 (add weight into personSession)
         * now weight of a person can change every session
        */
-       private static void dropOldTable(string tableName) {
+       private void dropOldTable(string tableName) {
                dbcmd.CommandText = "DROP TABLE " + tableName;
                dbcmd.ExecuteNonQuery();
        }
diff --git a/src/oldCodeNeedToDBConvert/sqlite/session.cs b/src/oldCodeNeedToDBConvert/sqlite/session.cs
index 898f453..b197f96 100644
--- a/src/oldCodeNeedToDBConvert/sqlite/session.cs
+++ b/src/oldCodeNeedToDBConvert/sqlite/session.cs
@@ -26,7 +26,7 @@ using Mono.Data.Sqlite;
 using Mono.Unix;
 
 
-class SqliteSessionOld : Sqlite
+public class SqliteSessionOld : Sqlite
 {
        public SqliteSessionOld() {
        }
@@ -72,7 +72,7 @@ class SqliteSessionOld : Sqlite
                                mySession.PersonsSportID, mySession.PersonsSpeciallityID, 
mySession.PersonsPractice, mySession.Comments);
 
                //3rd drop table sessions
-               Sqlite.dropTable(Constants.SessionTable);
+               SqliteGeneral.Sqlite.dropTable(Constants.SessionTable);
 
                //4d create table persons (now with sport related stuff
                //createTable(Constants.SessionTable);
@@ -86,11 +86,11 @@ class SqliteSessionOld : Sqlite
 
 
                //6th drop temp table
-               Sqlite.dropTable(Constants.ConvertTempTable);
+               SqliteGeneral.Sqlite.dropTable(Constants.ConvertTempTable);
        }
        
        /* used only on conversion from 0.55 to 0.56 */
-       public static int InsertOld(bool dbconOpened, string tableName, string name, string place, string 
date, int personsSportID, int personsSpeciallityID, int personsPractice, string comments)
+       public int InsertOld(bool dbconOpened, string tableName, string name, string place, string date, int 
personsSportID, int personsSpeciallityID, int personsPractice, string comments)
        {
                if(! dbconOpened)
                        dbcon.Open();
diff --git a/src/server.cs b/src/server.cs
index 54a7149..53f2830 100644
--- a/src/server.cs
+++ b/src/server.cs
@@ -180,7 +180,7 @@ public class Server
 
                                //update session currentSession (serverUniqueID) on client database
                                currentSession.ServerUniqueID = idAtServer;
-                               SqliteSession.UpdateServerUniqueID(currentSession.UniqueID, 
currentSession.ServerUniqueID);
+                               SqliteGeneral.SqliteSession.UpdateServerUniqueID(currentSession.UniqueID, 
currentSession.ServerUniqueID);
                        }
 
                        state = (int) Constants.ServerSessionStates.UPLOADINGDATA;
@@ -197,7 +197,7 @@ public class Server
                                        false); //means: do not returnPersonAndPSlist
                        
                        Constants.UploadCodes uCode;
-                       ArrayList notToUpload = 
SqlitePersonSessionNotUpload.SelectAll(currentSession.UniqueID);
+                       ArrayList notToUpload = 
SqliteGeneral.SqlitePersonSessionNotUpload.SelectAll(currentSession.UniqueID);
                        
                        //store in variable for updating progressBar from other thread
                        progressBarPersonsNum = persons.Count - notToUpload.Count;
@@ -222,7 +222,7 @@ public class Server
                                        
                                //if sport is user defined, upload it
                                //and when upload the person, do it with new sportID
-                               Sport sport = SqliteSport.Select(false, ps.SportID);
+                               Sport sport = SqliteGeneral.SqliteSport.Select(false, ps.SportID);
                                //but record old sport ID because locally will be a change in serverUniqueID
                                //(with slite update)
                                //but local sport has not to be changed
@@ -425,7 +425,7 @@ public class Server
                                        test.SessionID = currentSession.ServerUniqueID;
                                        
                                        if(test.Simulated == 0) {
-                                               RunType type = 
SqliteRunIntervalType.SelectAndReturnRunIntervalType(test.Type, true);
+                                               RunType type = 
SqliteGeneral.SqliteRunIntervalType.SelectAndReturnRunIntervalType(test.Type, true);
                                                if( ! type.IsPredefined) {
                                                        string insertedType = 
myServer.UploadRunIntervalType(type, evalSID);
                                                        if(insertedType != "-1") {
@@ -458,7 +458,7 @@ public class Server
                                countS = 0;                                     
 
                                string [] rts = SqliteGeneral.SqliteReactionTime.SelectReactionTimes(false, 
currentSession.UniqueID, person.UniqueID, "",
-                                               SqliteGeneral.Sqlite.Orders_by.DEFAULT, -1);
+                                               Sqlite.Orders_by.DEFAULT, -1);
 
                                SqliteGeneral.Sqlite.Open();
                                foreach(string myRt in rts) {
@@ -574,7 +574,7 @@ public class Server
                //update person (serverUniqueID) on client database
                person.ServerUniqueID = idAtServer;
 
-               SqlitePerson.Update(person);
+               SqliteGeneral.SqlitePerson.Update(person);
 
                return person;
        }
@@ -640,7 +640,7 @@ public class Server
                        
                        //update test (simulated) on client database
                        myTest.Simulated = idAtServer;
-                       SqliteEvent.UpdateSimulated(true, tableName, myTest.UniqueID, idAtServer);
+                       SqliteGeneral.SqliteEvent.UpdateSimulated(true, tableName, myTest.UniqueID, 
idAtServer);
                        
                        uCode = Constants.UploadCodes.OK;
                }
@@ -652,7 +652,7 @@ public class Server
                        ChronojumpServer myServer = new ChronojumpServer();
                        LogB.Information(myServer.ConnectDatabase());
                        
-                       ServerEvaluator myEval = SqliteServer.SelectEvaluator(1);
+                       ServerEvaluator myEval = SqliteGeneral.SqliteServer.SelectEvaluator(1);
 
                        bool success = false;
                        int evalSID = 
Convert.ToInt32(SqliteGeneral.SqlitePreferences.Select("evaluatorServerID"));
diff --git a/src/sqlite/country.cs b/src/sqlite/country.cs
index 6ef0645..ec135f1 100644
--- a/src/sqlite/country.cs
+++ b/src/sqlite/country.cs
@@ -32,7 +32,7 @@ using Mono.Unix;
 
 public class SqliteCountry : Sqlite
 {
-       protected internal void createTable()
+       protected override void createTable()
         {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.CountryTable + " ( " +
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index e75d656..ee62dae 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -171,7 +171,7 @@ public class SqliteEncoder : Sqlite
                                        if(count < checkboxes.Length && eSQL.status != checkboxes[count]) {
                                                eSQL.status = checkboxes[count];
 
-                                               SqliteEncoder.Update(true, eSQL, dbcmdTr);
+                                               SqliteGeneral.SqliteEncoder.Update(true, eSQL, dbcmdTr);
                                        }
 
                                        count ++;
diff --git a/src/sqlite/jumpType.cs b/src/sqlite/jumpType.cs
index ec5c8d4..8fda994 100644
--- a/src/sqlite/jumpType.cs
+++ b/src/sqlite/jumpType.cs
@@ -97,17 +97,17 @@ public class SqliteJumpType : Sqlite
                        {
                                dbcmdTr.Transaction = tr;
 
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Free", "jump_free.png", 
true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "SJ", "jump_sj.png", true, 
dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "SJl", "jump_sj_l.png", 
true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJ", "jump_cmj.png", 
true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJl", "jump_cmj_l.png", 
true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABK", "jump_abk.png", 
true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABKl", "jump_abk_l.png", 
true, dbcmdTr);
-                               //SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Max", "jump_max.png", 
true, dbcmdTr); //we already have "Free"
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Rocket", 
"jump_rocket.png", true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "DJa", "jump_dj_a.png", 
true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "DJna", "jump_dj.png", 
true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Free", 
"jump_free.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "SJ", 
"jump_sj.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "SJl", 
"jump_sj_l.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJ", 
"jump_cmj.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJl", 
"jump_cmj_l.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABK", 
"jump_abk.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABKl", 
"jump_abk_l.png", true, dbcmdTr);
+                               //SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Max", 
"jump_max.png", true, dbcmdTr); //we already have "Free"
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "Rocket", 
"jump_rocket.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "DJa", 
"jump_dj_a.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "DJna", 
"jump_dj.png", true, dbcmdTr);
                        }
                        tr.Commit();
                }
@@ -174,10 +174,10 @@ public class SqliteJumpType : Sqlite
                        {
                                dbcmdTr.Transaction = tr;
                                
-                               SqliteEvent.GraphLinkInsert (Constants.JumpRjTable, "RJ(j)", "jump_rj.png", 
true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpRjTable, "RJ(t)", "jump_rj.png", 
true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpRjTable, "RJ(unlimited)", 
"jump_rj_in.png", true, dbcmdTr);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpRjTable, "triple jump", 
"jump_rj.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpRjTable, "RJ(j)", 
"jump_rj.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpRjTable, "RJ(t)", 
"jump_rj.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpRjTable, 
"RJ(unlimited)", "jump_rj_in.png", true, dbcmdTr);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpRjTable, "triple 
jump", "jump_rj.png", true, dbcmdTr);
                        }
                        tr.Commit();
                }
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 2b0d26f..9f87636 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -29,7 +29,7 @@ using Mono.Unix;
 
 public sealed class SqliteGeneral
 {
-       private static Sqlite m_sqliteGeneral;
+       private static Sqlite m_sqlite;
        private static SqlitePreferences m_sqlitePreferences;
        private static SqliteJumpRj m_sqliteJumpRj;
        private static SqliteJump m_sqliteJump;
@@ -55,20 +55,52 @@ public sealed class SqliteGeneral
        private static SqliteEvent m_sqliteEvent;
        private static SqliteCountry m_sqliteCountry;
        private static SqliteStat m_sqliteStat;
+       private static SqlitePersonSessionOld m_sqlitePersonSessionOld;
+       private static SqlitePersonOld m_sqlitePersonOld;
+       private static SqliteSessionOld m_sqliteSessionOld;
+       private static SqliteOldConvert m_sqliteOldConvert;
 
        public SqliteGeneral()
        {
-               m_sqliteGeneral = new Sqlite();
+               m_sqlite = new Sqlite();
+               m_sqlite.Connect();
                m_sqlitePreferences = new SqlitePreferences();
-               // TODO create the other ones!
-
+               m_sqlitePreferences.Connect();
+               m_sqliteJumpRj = new SqliteJumpRj();
+               m_sqliteJump = new SqliteJump();
+               m_sqliteRunInterval = new SqliteRunInterval();
+               m_sqlitePerson = new SqlitePerson();
+               m_sqliteExecuteAuto = new SqliteExecuteAuto();
+               m_sqlitePersonSession = new SqlitePersonSession();
+               m_sqliteRun = new SqliteRun();
+               m_sqliteRunIntervalType = new SqliteRunIntervalType();
+               m_sqliteRunType = new SqliteRunType();
+               m_sqliteReactionTime = new SqliteReactionTime();
+               m_sqlitePulse = new SqlitePulse();
+               m_sqlitePulseType = new SqlitePulseType();
+               m_sqliteMultiChronopic = new SqliteMultiChronopic();
+               m_sqliteSport = new SqliteSport();
+               m_sqliteSpeciallity = new SqliteSpeciallity();
+               m_sqliteJumpType = new SqliteJumpType();
+               m_sqliteSession = new SqliteSession();
+               m_sqliteServer = new SqliteServer();
+               m_sqliteServerSession = new SqliteServerSession();
+               m_sqlitePersonSessionNotUpload = new SqlitePersonSessionNotUpload();
+               m_sqliteEncoder = new SqliteEncoder();
+               m_sqliteEvent = new SqliteEvent();
+               m_sqliteCountry = new SqliteCountry();
+               m_sqliteStat = new SqliteStat();
+               m_sqlitePersonSessionOld = new SqlitePersonSessionOld();
+               m_sqlitePersonOld = new SqlitePersonOld();
+               m_sqliteSessionOld = new SqliteSessionOld();
+               m_sqliteOldConvert = new SqliteOldConvert();
        }
 
        public static Sqlite Sqlite
        {
                get
                {
-                       return m_sqliteGeneral;
+                       return m_sqlite;
                }
        }
 
@@ -265,6 +297,35 @@ public sealed class SqliteGeneral
                        return m_sqliteStat;
                }
        }
+       public static SqlitePersonSessionOld SqlitePersonSessionOld
+       {
+               get
+               {
+                       return m_sqlitePersonSessionOld;
+               }
+       }
+       public static SqlitePersonOld SqlitePersonOld
+       {
+               get
+               {
+                       return m_sqlitePersonOld;
+               }
+       }
+       public static SqliteSessionOld SqliteSessionOld
+       {
+               get
+               {
+                       return m_sqliteSessionOld;
+               }
+       }
+
+       public static SqliteOldConvert SqliteOldConvert
+       {
+               get
+               {
+                       return m_sqliteOldConvert;
+               }
+       }
 }
 
 public class Sqlite
@@ -276,15 +337,15 @@ public class Sqlite
        //database was on c:\.chronojump\ or in ~/.chronojump
        //now it's on installed dir, eg linux: ~/Chronojump/database
        private string home = Util.GetDatabaseDir();
-       private string sqlFile = home + Path.DirectorySeparatorChar + "chronojump.db";
+       private string sqlFile = Util.GetDatabaseDir() + Path.DirectorySeparatorChar + "chronojump.db";
        
        private string temp = Util.GetDatabaseTempDir();
-       private string sqlFileTemp = temp + Path.DirectorySeparatorChar + "chronojump.db";
+       private string sqlFileTemp = Util.GetDatabaseTempDir() + Path.DirectorySeparatorChar + 
"chronojump.db";
 
        //http://www.mono-project.com/SQLite
 
-       string connectionString = "version = 3; Data source = " + sqlFile;
-       string connectionStringTemp = "version = 3; Data source = " + sqlFileTemp;
+       private string connectionString;
+       private string connectionStringTemp;
 
        //test to try to open db in a dir with accents (latin)
        //string connectionString = "globalization requestEncoding=\"iso-8859-1\"; 
responseEncoding=\"iso-8859-1\"; fileEncoding=\"iso-8859-1\"; culture=\"es-ES\";version = 3; Data source = " 
+ sqlFile;
@@ -316,6 +377,11 @@ public class Sqlite
        string lastChronojumpDatabaseVersion = "1.32";
 
        public Sqlite() {
+               connectionString = "version = 3; Data source = " + sqlFile;
+               connectionStringTemp = "version = 3; Data source = " + sqlFileTemp;
+
+               sqlFileServer = home + Path.DirectorySeparatorChar + "chronojump_server.db";
+               connectionStringServer = "version = 3; Data source = " + sqlFileServer;
        }
 
        protected virtual void createTable(string tableName) {
@@ -391,7 +457,6 @@ public class Sqlite
                string connectionStringTest = "version = 3; Data source = " + sqlFileTest;
                string connectionStringTestTemp = "version = 3; Data source = " + sqlFileTestTemp;
 
-
                dbcon.ConnectionString = connectionStringTest;
                dbcmd = dbcon.CreateCommand();
 
@@ -852,12 +917,12 @@ public class Sqlite
                                        type.Name = s[0];
                                        type.Distance = Convert.ToDouble(s[1]);
                                        type.Description = s[2];
-                                       SqliteRunType.Insert(type, Constants.RunTypeTable, true);
+                                       SqliteGeneral.SqliteRunType.Insert(type, Constants.RunTypeTable, 
true);
                                }
        
 
-                               SqliteEvent.createGraphLinkTable();
-                               SqliteRunType.AddGraphLinksRunSimpleAgility();  
+                               SqliteGeneral.SqliteEvent.createGraphLinkTable();
+                               SqliteGeneral.SqliteRunType.AddGraphLinksRunSimpleAgility();    
 
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.49", true); 
                                LogB.SQL("Added graphLinkTable, added Rocket jump and 5 agility tests: 
(20Yard, 505, Illinois, Shuttle-Run & ZigZag. Added graphs pof the 5 agility tests)");
@@ -882,8 +947,8 @@ public class Sqlite
 
                        if(currentVersion == "0.50") {
                                SqliteGeneral.Sqlite.Open();
-                               SqliteRunType.AddGraphLinksRunSimple(); 
-                               SqliteRunIntervalType.AddGraphLinksRunInterval();       
+                               SqliteGeneral.SqliteRunType.AddGraphLinksRunSimple();   
+                               SqliteGeneral.SqliteRunIntervalType.AddGraphLinksRunInterval(); 
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.51", true); 
                                LogB.SQL("added graphLinks for run simple and interval");
                                SqliteGeneral.Sqlite.Close();
@@ -893,8 +958,8 @@ public class Sqlite
                        if(currentVersion == "0.51") {
                                SqliteGeneral.Sqlite.Open();
                                SqliteGeneral.SqliteJumpType.Update ("CJl", "CMJl"); 
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJl", "jump_cmj_l.png", 
true);
-                               SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABKl", "jump_abk_l.png", 
true);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "CMJl", 
"jump_cmj_l.png", true);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.JumpTable, "ABKl", 
"jump_abk_l.png", true);
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.52", true); 
                                LogB.SQL("added graphLinks for cmj_l and abk_l, fixed CMJl name");
                                SqliteGeneral.Sqlite.Close();
@@ -907,7 +972,7 @@ public class Sqlite
                                SqliteGeneral.Sqlite.Close();
                                
                                //this needs the dbCon closed
-                               SqlitePersonSessionOld.moveOldTableToNewTable (); 
+                               SqliteGeneral.SqlitePersonSessionOld.moveOldTableToNewTable (); 
                                
                                SqliteGeneral.Sqlite.Open();
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.53", true); 
@@ -920,10 +985,10 @@ public class Sqlite
                        if(currentVersion == "0.53") {
                                SqliteGeneral.Sqlite.Open();
 
-                               SqliteSport.createTable();
-                               SqliteSport.initialize();
-                               SqliteSpeciallity.createTable();
-                               SqliteSpeciallity.initialize();
+                               SqliteGeneral.SqliteSport.createTable();
+                               SqliteGeneral.SqliteSport.initialize();
+                               SqliteGeneral.SqliteSpeciallity.createTable();
+                               SqliteGeneral.SqliteSpeciallity.initialize();
 
                                //SqlitePersonOld.convertTableToSportRelated (); 
                                needToConvertPersonToSport = true;
@@ -937,7 +1002,7 @@ public class Sqlite
                        if(currentVersion == "0.54") {
                                SqliteGeneral.Sqlite.Open();
 
-                               SqliteSpeciallity.InsertUndefined(true);
+                               SqliteGeneral.SqliteSpeciallity.InsertUndefined(true);
 
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.55", true); 
                                SqliteGeneral.Sqlite.Close();
@@ -948,7 +1013,7 @@ public class Sqlite
                        if(currentVersion == "0.55") {
                                SqliteGeneral.Sqlite.Open();
 
-                               SqliteSessionOld.convertTableAddingSportStuff();
+                               SqliteGeneral.SqliteSessionOld.convertTableAddingSportStuff();
 
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.56", true); 
                                SqliteGeneral.Sqlite.Close();
@@ -999,8 +1064,8 @@ public class Sqlite
                                sqliteRunIntervalObject.createTable(Constants.TempRunIntervalTable);
 
                                conversionRate ++;
-                               SqliteCountry.createTable();
-                               SqliteCountry.initialize();
+                               SqliteGeneral.SqliteCountry.createTable();
+                               SqliteGeneral.SqliteCountry.initialize();
                                
                                conversionRate ++;
                                int columnsBefore = 10;
@@ -1028,14 +1093,14 @@ public class Sqlite
                                SqliteGeneral.Sqlite.Open();
                
                                //check if "republic" is in country table
-                               if(SqliteCountry.TableHasOldRepublicStuff()){
+                               if(SqliteGeneral.SqliteCountry.TableHasOldRepublicStuff()){
                                        conversionRateTotal = 4;
                                        conversionRate = 1;
                                        SqliteGeneral.Sqlite.dropTable(Constants.CountryTable);
                                        conversionRate ++;
-                                       SqliteCountry.createTable();
+                                       SqliteGeneral.SqliteCountry.createTable();
                                        conversionRate ++;
-                                       SqliteCountry.initialize();
+                                       SqliteGeneral.SqliteCountry.initialize();
                                        conversionRate ++;
                                        LogB.SQL("Countries without kingdom or republic (except when 
needed)");
                                }
@@ -1079,7 +1144,7 @@ public class Sqlite
                                convertTables(new SqliteSession(), Constants.SessionTable, columnsBefore, 
arrayServerID, false);
                                
                                conversionRate = 3;
-                               SqliteEvent.SimulatedConvertToNegative();
+                               SqliteGeneral.SqliteEvent.SimulatedConvertToNegative();
 
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.60", true); 
                                LogB.SQL("Converted DB to 0.60 (added volumeOn and evaluatorServerID to 
preferences. session has now serverUniqueID. Simulated now are -1, because 0 is real and positive is 
serverUniqueID)"); 
@@ -1109,7 +1174,7 @@ public class Sqlite
                                type.Unlimited = false;
                                type.Description = "Modified time Getup and Go test";
                                type.DistancesString = "1-7-19";
-                               SqliteRunIntervalType.Insert(type, Constants.RunIntervalTypeTable, true);
+                               SqliteGeneral.SqliteRunIntervalType.Insert(type, 
Constants.RunIntervalTypeTable, true);
                                
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.61", true); 
                                LogB.SQL("Converted DB to 0.61 added RunIntervalType distancesString (now we 
van have interval tests with different distances of tracks). Added MTGUG");
@@ -1141,9 +1206,9 @@ public class Sqlite
                                type.Name = "Margaria";
                                type.Distance = 0;
                                type.Description = "Margaria-Kalamen test";
-                               SqliteRunType.Insert(type, Constants.RunTypeTable, true);
+                               SqliteGeneral.SqliteRunType.Insert(type, Constants.RunTypeTable, true);
 
-                               SqliteEvent.GraphLinkInsert (Constants.RunTable, "Margaria", "margaria.png", 
true);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "Margaria", 
"margaria.png", true);
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.64", true); 
                                
                                LogB.SQL("Converted DB to 0.64 (added margaria test)"); 
@@ -1203,9 +1268,9 @@ public class Sqlite
                                type.Name = "Gesell-DBT";
                                type.Distance = 2.5;
                                type.Description = "Gesell Dynamic Balance Test";
-                               SqliteRunType.Insert(type, Constants.RunTypeTable, true);
+                               SqliteGeneral.SqliteRunType.Insert(type, Constants.RunTypeTable, true);
 
-                               SqliteEvent.GraphLinkInsert (Constants.RunTable, "Gesell-DBT", 
"gesell_dbt.png", true);
+                               SqliteGeneral.SqliteEvent.GraphLinkInsert (Constants.RunTable, "Gesell-DBT", 
"gesell_dbt.png", true);
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.69", true); 
                                
                                LogB.SQL("Converted DB to 0.69 (added Gesell-DBT test)"); 
@@ -1223,7 +1288,7 @@ public class Sqlite
                        if(currentVersion == "0.70") {
                                SqliteGeneral.Sqlite.Open();
                                
-                               SqlitePersonSessionNotUpload.CreateTable();
+                               SqliteGeneral.SqlitePersonSessionNotUpload.CreateTable();
 
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "0.71", true); 
                                
@@ -1416,7 +1481,7 @@ public class Sqlite
                                type.Unlimited = false;
                                type.Description = "RSA testing";
                                type.DistancesString = "8-4-R3-5";
-                               SqliteRunIntervalType.Insert(type, Constants.RunIntervalTypeTable, true);
+                               SqliteGeneral.SqliteRunIntervalType.Insert(type, 
Constants.RunIntervalTypeTable, true);
 
                                LogB.SQL("Added 1st RSA test.");
 
@@ -1457,7 +1522,7 @@ public class Sqlite
                        }
                        if(currentVersion == "0.87") {
                                //delete runInterval type
-                               SqliteRunIntervalType.Delete("RSA 8-4-R3-5");
+                               SqliteGeneral.SqliteRunIntervalType.Delete("RSA 8-4-R3-5");
 
                                //delete all it's runs
                                SqliteGeneral.Sqlite.Open();
@@ -1467,7 +1532,7 @@ public class Sqlite
                                dbcmd.ExecuteNonQuery();
                                
                                //add know RSAs
-                               SqliteRunIntervalType.addRSA();
+                               SqliteGeneral.SqliteRunIntervalType.addRSA();
                                addedRSA = true;
 
                                LogB.SQL("Deleted fake RSA test and added known RSA tests.");
@@ -1609,7 +1674,7 @@ public class Sqlite
                        if(currentVersion == "0.98") {
                                SqliteGeneral.Sqlite.Open();
                
-                               ArrayList array = 
SqliteOldConvert.EncoderSelect098(true,-1,-1,-1,"all",false);
+                               ArrayList array = 
SqliteGeneral.SqliteOldConvert.EncoderSelect098(true,-1,-1,-1,"all",false);
                                
                                conversionRateTotal = array.Count;
                                
@@ -1617,7 +1682,7 @@ public class Sqlite
                                
                                //CAUTION: do like this and never do createTableEncoder,
                                //because method will change in the future and will break updates
-                               SqliteOldConvert.createTableEncoder99(); 
+                               SqliteGeneral.SqliteOldConvert.createTableEncoder99(); 
                        
                                int count = 1;  
                                foreach( EncoderSQL098 es in array) {
@@ -1678,9 +1743,9 @@ public class Sqlite
                                SqliteGeneral.Sqlite.Open();
                        
                                RunType type = new RunType("Agility-T-Test");
-                               SqliteRunType.Insert(type, Constants.RunTypeTable, true);
+                               SqliteGeneral.SqliteRunType.Insert(type, Constants.RunTypeTable, true);
                                type = new RunType("Agility-3L3R");
-                               SqliteRunIntervalType.Insert(type, Constants.RunIntervalTypeTable, true);
+                               SqliteGeneral.SqliteRunIntervalType.Insert(type, 
Constants.RunIntervalTypeTable, true);
 
                                LogB.SQL("Added Agility Tests: Agility-T-Test, Agility-3l3R");
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.02", true); 
@@ -1703,7 +1768,7 @@ public class Sqlite
                        if(currentVersion == "1.03") {
                                SqliteGeneral.Sqlite.Open();
                
-                               ArrayList array = 
SqliteOldConvert.EncoderSelect103(true,-1,-1,-1,"all",false);
+                               ArrayList array = 
SqliteGeneral.SqliteOldConvert.EncoderSelect103(true,-1,-1,-1,"all",false);
                                
                                conversionRateTotal = array.Count;
                                
@@ -1711,7 +1776,7 @@ public class Sqlite
                                
                                //CAUTION: do like this and never do createTableEncoder,
                                //because method will change in the future and will break updates
-                               SqliteOldConvert.createTableEncoder104(); 
+                               SqliteGeneral.SqliteOldConvert.createTableEncoder104(); 
                                
                                //in this conversion put this as default for all SQL rows
                                EncoderConfiguration econf = new EncoderConfiguration();
@@ -1888,7 +1953,7 @@ public class Sqlite
                                        type.Description = "RSA RAST Test";
                                        type.DistancesString = "35-R10";
                                        
-                                       SqliteRunIntervalType.Insert(type, Constants.RunIntervalTypeTable, 
true);
+                                       SqliteGeneral.SqliteRunIntervalType.Insert(type, 
Constants.RunIntervalTypeTable, true);
                                        addedRSA = true;
                                }
                                
@@ -1913,7 +1978,7 @@ public class Sqlite
                        
                                LogB.SQL("URLs from absolute to relative)");
                                
-                               SqliteOldConvert.ConvertAbsolutePathsToRelative(); 
+                               SqliteGeneral.SqliteOldConvert.ConvertAbsolutePathsToRelative(); 
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.12", true); 
                                SqliteGeneral.Sqlite.Close();
 
@@ -1924,7 +1989,7 @@ public class Sqlite
                        
                                LogB.SQL("Added ExecuteAuto table");
                                
-                               SqliteExecuteAuto.createTableExecuteAuto();
+                               SqliteGeneral.SqliteExecuteAuto.createTableExecuteAuto();
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.13", true); 
                                SqliteGeneral.Sqlite.Close();
 
@@ -1935,7 +2000,7 @@ public class Sqlite
                        
                                LogB.SQL("slCMJ -> slCMJleft, slCMJright");
 
-                               SqliteOldConvert.slCMJDivide();
+                               SqliteGeneral.SqliteOldConvert.slCMJDivide();
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.14", true); 
                                SqliteGeneral.Sqlite.Close();
 
@@ -1946,7 +2011,7 @@ public class Sqlite
                        
                                LogB.SQL("added Chronojump profile and bilateral profile");
 
-                               SqliteExecuteAuto.addChronojumpProfileAndBilateral();
+                               SqliteGeneral.SqliteExecuteAuto.addChronojumpProfileAndBilateral();
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.15", true); 
                                SqliteGeneral.Sqlite.Close();
 
@@ -1980,7 +2045,7 @@ public class Sqlite
                        
                                LogB.SQL("Deleted Negative runInterval runs (bug from last version)");
 
-                               SqliteOldConvert.deleteNegativeRuns();
+                               SqliteGeneral.SqliteOldConvert.deleteNegativeRuns();
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.18", true); 
                                SqliteGeneral.Sqlite.Close();
 
@@ -2012,8 +2077,8 @@ public class Sqlite
                                
                                SqliteGeneral.Sqlite.Open();
                                
-                               SqliteOldConvert.ConvertAbsolutePathsToRelative(); //videoURLs got absolute 
again
-                               SqliteOldConvert.FixLostVideoURLAfterEncoderRecalculate();
+                               SqliteGeneral.SqliteOldConvert.ConvertAbsolutePathsToRelative(); //videoURLs 
got absolute again
+                               SqliteGeneral.SqliteOldConvert.FixLostVideoURLAfterEncoderRecalculate();
 
                                SqliteGeneral.SqlitePreferences.Update ("databaseVersion", "1.21", true); 
                                SqliteGeneral.Sqlite.Close();
@@ -2108,7 +2173,7 @@ public class Sqlite
                                LogB.SQL("Added SIMULATED session");
        
                                //add SIMULATED session if doesn't exists. Unique session where tests can be 
simulated.
-                               SqliteSession.insertSimulatedSession();
+                               SqliteGeneral.SqliteSession.insertSimulatedSession();
 
                                currentVersion = updateVersion("1.30");
                        }
@@ -2202,9 +2267,9 @@ public class Sqlite
                        sqliteSessionObject.createTable(Constants.SessionTable);
                        
                        //add SIMULATED session if doesn't exists. Unique session where tests can be 
simulated.
-                       SqliteSession.insertSimulatedSession();
+                       SqliteGeneral.SqliteSession.insertSimulatedSession();
                        
-                       SqlitePersonSessionNotUpload.CreateTable();
+                       SqliteGeneral.SqlitePersonSessionNotUpload.CreateTable();
                        creationRate ++;
                }
                
@@ -2213,7 +2278,7 @@ public class Sqlite
                sqlitePersonObject.createTable(Constants.PersonTable);
 
                //graphLinkTable
-               SqliteEvent.createGraphLinkTable();
+               SqliteGeneral.SqliteEvent.createGraphLinkTable();
                creationRate ++;
                
                //jumps
@@ -2242,11 +2307,11 @@ public class Sqlite
                creationRate ++;
                SqliteRunType sqliteRunTypeObject = new SqliteRunType();
                sqliteRunTypeObject.createTable(Constants.RunTypeTable);
-               SqliteRunType.initializeTable();
+               SqliteGeneral.SqliteRunType.initializeTable();
 
                SqliteRunIntervalType sqliteRunIntervalTypeObject = new SqliteRunIntervalType();
                sqliteRunIntervalTypeObject.createTable(Constants.RunIntervalTypeTable);
-               SqliteRunIntervalType.initializeTable();
+               SqliteGeneral.SqliteRunIntervalType.initializeTable();
                
                //reactionTimes
                creationRate ++;
@@ -2257,8 +2322,8 @@ public class Sqlite
                creationRate ++;
                SqlitePulse sqlitePulseObject = new SqlitePulse();
                sqlitePulseObject.createTable(Constants.PulseTable);
-               SqlitePulseType.createTablePulseType();
-               SqlitePulseType.initializeTablePulseType();
+               SqliteGeneral.SqlitePulseType.createTablePulseType();
+               SqliteGeneral.SqlitePulseType.initializeTablePulseType();
                
                //multiChronopic tests          
                creationRate ++;
@@ -2275,11 +2340,11 @@ public class Sqlite
 
                //sports
                creationRate ++;
-               SqliteSport.createTable();
-               SqliteSport.initialize();
-               SqliteSpeciallity.createTable();
-               SqliteSpeciallity.initialize();
-               SqliteSpeciallity.InsertUndefined(true);
+               SqliteGeneral.SqliteSport.createTable();
+               SqliteGeneral.SqliteSport.initialize();
+               SqliteGeneral.SqliteSpeciallity.createTable();
+               SqliteGeneral.SqliteSpeciallity.initialize();
+               SqliteGeneral.SqliteSpeciallity.InsertUndefined(true);
                                
                creationRate ++;
                SqlitePersonSession sqlitePersonSessionObject = new SqlitePersonSession();
@@ -2290,11 +2355,11 @@ public class Sqlite
                SqliteGeneral.SqlitePreferences.initializeTable(lastChronojumpDatabaseVersion, 
creatingBlankDatabase);
                
                creationRate ++;
-               SqliteCountry.createTable();
-               SqliteCountry.initialize();
+               SqliteGeneral.SqliteCountry.createTable();
+               SqliteGeneral.SqliteCountry.initialize();
                                
-               SqliteExecuteAuto.createTableExecuteAuto();
-               SqliteExecuteAuto.addChronojumpProfileAndBilateral();
+               SqliteGeneral.SqliteExecuteAuto.createTableExecuteAuto();
+               SqliteGeneral.SqliteExecuteAuto.addChronojumpProfileAndBilateral();
                
                //changes [from - to - desc]
                //1.31 - 1.32 Converted DB to 1.32 encoderCaptureOptionsWin -> preferences
@@ -2528,7 +2593,7 @@ public class Sqlite
                SqliteGeneral.Sqlite.Close();
        }
 
-       protected void dropTable(string tableName) {
+       public void dropTable(string tableName) {
                dbcmd.CommandText = "DROP TABLE " + tableName;
                dbcmd.ExecuteNonQuery();
        }
@@ -2725,8 +2790,8 @@ public class Sqlite
 
                foreach(int personID in myArray) {
                        //if person is not in other sessions, delete it from DB
-                       if(! SqlitePersonSessionOld.PersonExistsInPS(personID))
-                               SqlitePersonOld.Delete(personID);
+                       if(! SqliteGeneral.SqlitePersonSessionOld.PersonExistsInPS(personID))
+                               SqliteGeneral.SqlitePersonOld.Delete(personID);
                }
        }
                                
@@ -3267,8 +3332,8 @@ LogB.SQL("5" + tableName);
         * SERVER STUFF
         */
        
-       public string sqlFileServer = home + Path.DirectorySeparatorChar + "chronojump_server.db";
-       string connectionStringServer = "version = 3; Data source = " + sqlFileServer;
+       public string sqlFileServer;
+       public string connectionStringServer;
        
        public bool CheckFileServer(){
                if (File.Exists(sqlFileServer))
diff --git a/src/sqlite/oldConvert.cs b/src/sqlite/oldConvert.cs
index 7beb3bc..0f0707e 100644
--- a/src/sqlite/oldConvert.cs
+++ b/src/sqlite/oldConvert.cs
@@ -26,7 +26,7 @@ using Mono.Data.Sqlite;
 
 /* methods for convert from old tables to new tables */
 
-class SqliteOldConvert : Sqlite
+public class SqliteOldConvert : Sqlite
 {
 
        /*
@@ -104,9 +104,9 @@ class SqliteOldConvert : Sqlite
                //it's a conversion, dbcon is opened
 
                //changes on jumpType table
-               SqliteJumpType.Delete(Constants.JumpTypeTable, "slCMJ", true);
-               SqliteJumpType.JumpTypeInsert("slCMJleft:1:0:Single-leg CMJ jump", true);
-               SqliteJumpType.JumpTypeInsert("slCMJright:1:0:Single-leg CMJ jump", true);
+               SqliteGeneral.SqliteJumpType.Delete(Constants.JumpTypeTable, "slCMJ", true);
+               SqliteGeneral.SqliteJumpType.JumpTypeInsert("slCMJleft:1:0:Single-leg CMJ jump", true);
+               SqliteGeneral.SqliteJumpType.JumpTypeInsert("slCMJright:1:0:Single-leg CMJ jump", true);
 
 
                //changes on jump table
diff --git a/src/sqlite/personSession.cs b/src/sqlite/personSession.cs
index 53c6de2..946b9cc 100644
--- a/src/sqlite/personSession.cs
+++ b/src/sqlite/personSession.cs
@@ -383,7 +383,7 @@ public class SqlitePersonSession : Sqlite
                
 
                //delete encoder signal and curves (and it's videos)
-               ArrayList encoderArray = SqliteEncoder.Select(
+               ArrayList encoderArray = SqliteGeneral.SqliteEncoder.Select(
                                true, -1, Convert.ToInt32(personID), Convert.ToInt32(sessionID), 
Constants.EncoderGI.ALL,
                                -1, "signal", EncoderSQL.Eccons.ALL,
                                false, true);
@@ -395,7 +395,7 @@ public class SqlitePersonSession : Sqlite
                        SqliteGeneral.Sqlite.Delete(true, Constants.EncoderTable, 
Convert.ToInt32(eSQL.uniqueID));
                }
 
-               encoderArray = SqliteEncoder.Select(
+               encoderArray = SqliteGeneral.SqliteEncoder.Select(
                                true, -1, Convert.ToInt32(personID), Convert.ToInt32(sessionID), 
Constants.EncoderGI.ALL,
                                -1, "curve", EncoderSQL.Eccons.ALL, 
                                false, true);
@@ -407,7 +407,7 @@ public class SqlitePersonSession : Sqlite
                                Util.FileDelete(eSQL.future2);
                        */
                        SqliteGeneral.Sqlite.Delete(true, Constants.EncoderTable, 
Convert.ToInt32(eSQL.uniqueID));
-                       SqliteEncoder.DeleteSignalCurveWithCurveID(true, Convert.ToInt32(eSQL.uniqueID));
+                       SqliteGeneral.SqliteEncoder.DeleteSignalCurveWithCurveID(true, 
Convert.ToInt32(eSQL.uniqueID));
                }
                                
                
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index e94438b..1550a43 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -26,7 +26,7 @@ using Mono.Data.Sqlite;
 
 public class SqlitePreferences : Sqlite
 {
-       protected internal void createTable()
+       protected override void createTable()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.PreferencesTable + " ( " +
@@ -121,19 +121,19 @@ public class SqlitePreferences : Sqlite
        //Called from initialize
        public void Insert(string myName, string myValue, SqliteCommand mycmd)
        {
-               //SqliteGeneral.Sqlite.Open();
+               //Open();
                mycmd.CommandText = "INSERT INTO " + Constants.PreferencesTable + 
                        " (name, value) VALUES (\"" + 
                        myName + "\", \"" + myValue + "\")" ;
                LogB.SQL(mycmd.CommandText.ToString());
                mycmd.ExecuteNonQuery();
-               //SqliteGeneral.Sqlite.Close();
+               //Close();
        }
 
        public void Update(string myName, string myValue, bool dbconOpened)
        {
                if(! dbconOpened)
-                       SqliteGeneral.Sqlite.Open();
+                       Open();
 
                dbcmd.CommandText = "UPDATE " + Constants.PreferencesTable +
                        " SET value = \"" + myValue + 
@@ -142,7 +142,7 @@ public class SqlitePreferences : Sqlite
                dbcmd.ExecuteNonQuery();
                
                if(! dbconOpened)
-                       SqliteGeneral.Sqlite.Close();
+                       Close();
        }
 
        //Called from most of all old Chronojump methods
@@ -154,7 +154,7 @@ public class SqlitePreferences : Sqlite
        public string Select (string myName, bool dbconOpened) 
        {
                if(! dbconOpened)
-                       SqliteGeneral.Sqlite.Open();
+                       Open();
 
                dbcmd.CommandText = "SELECT value FROM " + Constants.PreferencesTable + 
                        " WHERE name == \"" + myName + "\"" ;
@@ -173,14 +173,14 @@ public class SqlitePreferences : Sqlite
                reader.Close();
                
                if(! dbconOpened)
-                       SqliteGeneral.Sqlite.Close();
+                       Close();
 
                return myReturn;
        }
        
        public Preferences SelectAll () 
        {
-               SqliteGeneral.Sqlite.Open();
+               Open();
                dbcmd.CommandText = "SELECT * FROM " + Constants.PreferencesTable; 
                LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
@@ -293,7 +293,7 @@ public class SqlitePreferences : Sqlite
                }
 
                reader.Close();
-               SqliteGeneral.Sqlite.Close();
+               Close();
 
                return preferences;
        }
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index 8f63b57..2191499 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -707,7 +707,7 @@ public class SqliteSession : Sqlite
                //delete from encoder start ------>
 
                //signals
-               ArrayList encoderArray = SqliteEncoder.Select(
+               ArrayList encoderArray = SqliteGeneral.SqliteEncoder.Select(
                                true, -1, -1, Convert.ToInt32(uniqueID), Constants.EncoderGI.ALL,
                                -1, "signal", EncoderSQL.Eccons.ALL,
                                false, true);
@@ -720,7 +720,7 @@ public class SqliteSession : Sqlite
                }
                
                //curves
-               encoderArray = SqliteEncoder.Select(
+               encoderArray = SqliteGeneral.SqliteEncoder.Select(
                                true, -1, -1, Convert.ToInt32(uniqueID), Constants.EncoderGI.ALL,
                                -1, "curve",  EncoderSQL.Eccons.ALL,
                                false, true);
@@ -732,7 +732,7 @@ public class SqliteSession : Sqlite
                                Util.FileDelete(eSQL.videoURL);
                        */
                        SqliteGeneral.Sqlite.Delete(true, Constants.EncoderTable, 
Convert.ToInt32(eSQL.uniqueID));
-                       SqliteEncoder.DeleteSignalCurveWithCurveID(true, Convert.ToInt32(eSQL.uniqueID));
+                       SqliteGeneral.SqliteEncoder.DeleteSignalCurveWithCurveID(true, 
Convert.ToInt32(eSQL.uniqueID));
                }
                
                //<------- delete from encoder end
diff --git a/src/sqlite/speciallity.cs b/src/sqlite/speciallity.cs
index a696e3f..532f28b 100644
--- a/src/sqlite/speciallity.cs
+++ b/src/sqlite/speciallity.cs
@@ -30,7 +30,7 @@ using Mono.Unix;
 
 public class SqliteSpeciallity : Sqlite
 {
-       protected internal void createTable()
+       protected override void createTable()
         {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.SpeciallityTable + " ( " +
@@ -56,7 +56,7 @@ public class SqliteSpeciallity : Sqlite
                                        string [] strFull = myString.Split(new char[] {':'});
                                        string sportName = strFull[0];
                                        string speciallityEnglishName = strFull[1];
-                                       int sportID = SqliteSport.SelectID(sportName);
+                                       int sportID = SqliteGeneral.SqliteSport.SelectID(sportName);
                                        Insert(true, dbcmdTr, sportID, speciallityEnglishName);
                                        conversionSubRate ++;
                                }
diff --git a/src/stats/djIndex.cs b/src/stats/djIndex.cs
index e6c2d6b..7ee0873 100644
--- a/src/stats/djIndex.cs
+++ b/src/stats/djIndex.cs
@@ -76,13 +76,13 @@ public class StatDjIndex : Stat
                        if(multisession) {
                                string operation = "AVG";
                                processDataMultiSession ( 
-                                               SqliteStat.DjIndexes(indexType, sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
                                                        operation, jumpType, showSex), 
                                                true, sessions.Count);
                        } else {
                                string operation = "AVG";
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                                                       SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
@@ -91,14 +91,14 @@ public class StatDjIndex : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        if(multisession) {
                                string operation = "MAX";
-                               processDataMultiSession ( SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                               processDataMultiSession ( SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                        operation, jumpType, showSex),  
                                                true, sessions.Count);
                        } else {
                                string operation = ""; //no need of "MAX", there's an order by jump.tv desc
                                                        //and clenaDontWanted will do his work
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                                                       SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
diff --git a/src/stats/djPower.cs b/src/stats/djPower.cs
index 2c8ab31..71c8a4e 100644
--- a/src/stats/djPower.cs
+++ b/src/stats/djPower.cs
@@ -78,13 +78,13 @@ public class StatDjPower : Stat
                        if(multisession) {
                                string operation = "AVG";
                                processDataMultiSession ( 
-                                               SqliteStat.DjIndexes(indexType, sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
                                                        operation, jumpType, showSex), 
                                                true, sessions.Count);
                        } else {
                                string operation = "AVG";
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                                                       SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
@@ -93,14 +93,14 @@ public class StatDjPower : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        if(multisession) {
                                string operation = "MAX";
-                               processDataMultiSession ( SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                               processDataMultiSession ( SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                        operation, jumpType, showSex),  
                                                true, sessions.Count);
                        } else {
                                string operation = ""; //no need of "MAX", there's an order by jump.tv desc
                                                        //and clenaDontWanted will do his work
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                                                       SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
diff --git a/src/stats/djQ.cs b/src/stats/djQ.cs
index b9f3b24..d62081c 100644
--- a/src/stats/djQ.cs
+++ b/src/stats/djQ.cs
@@ -76,13 +76,13 @@ public class StatDjQ : Stat
                        if(multisession) {
                                string operation = "AVG";
                                processDataMultiSession ( 
-                                               SqliteStat.DjIndexes(indexType, sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
                                                        operation, jumpType, showSex), 
                                                true, sessions.Count);
                        } else {
                                string operation = "AVG";
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                                                       SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
@@ -91,14 +91,14 @@ public class StatDjQ : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        if(multisession) {
                                string operation = "MAX";
-                               processDataMultiSession ( SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                               processDataMultiSession ( SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                        operation, jumpType, showSex),  
                                                true, sessions.Count);
                        } else {
                                string operation = ""; //no need of "MAX", there's an order by jump.tv desc
                                                        //and clenaDontWanted will do his work
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.DjIndexes(indexType, sessionString, 
multisession, 
+                                                       SqliteGeneral.SqliteStat.DjIndexes(indexType, 
sessionString, multisession, 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
diff --git a/src/stats/fv.cs b/src/stats/fv.cs
index 73f948f..225f809 100644
--- a/src/stats/fv.cs
+++ b/src/stats/fv.cs
@@ -71,11 +71,11 @@ public class StatFv : StatJumpIndexes
                if(statsJumpsType == 3) { //avg of each jumper
                        if(multisession) {
                                processDataMultiSession ( 
-                                               SqliteStat.Fv(sessionString, multisession, "AVG(", ")", 
jump1, jump2, showSex), 
+                                               SqliteGeneral.SqliteStat.Fv(sessionString, multisession, 
"AVG(", ")", jump1, jump2, showSex), 
                                                true, sessions.Count);
                        } else {
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.Fv(sessionString, multisession, "AVG(", 
")", jump1, jump2, showSex), 
+                                                       SqliteGeneral.SqliteStat.Fv(sessionString, 
multisession, "AVG(", ")", jump1, jump2, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
                        }
@@ -85,10 +85,10 @@ public class StatFv : StatJumpIndexes
                        //max jump1, max jump2 (seems more real)
                        //max jump1, min jump2 (index goes greater)
                        if(multisession) {
-                               processDataMultiSession ( SqliteStat.Fv(sessionString, multisession, "MAX(", 
")", jump1, jump2, showSex),  
+                               processDataMultiSession ( SqliteGeneral.SqliteStat.Fv(sessionString, 
multisession, "MAX(", ")", jump1, jump2, showSex),  
                                                true, sessions.Count);
                        } else {
-                               processDataSimpleSession ( SqliteStat.Fv(sessionString, multisession, "MAX(", 
")", jump1, jump2, showSex), 
+                               processDataSimpleSession ( SqliteGeneral.SqliteStat.Fv(sessionString, 
multisession, "MAX(", ")", jump1, jump2, showSex), 
                                                true, dataColumns);
                        }
                }
diff --git a/src/stats/graphs/rjEvolution.cs b/src/stats/graphs/rjEvolution.cs
index 826b976..1e504bf 100644
--- a/src/stats/graphs/rjEvolution.cs
+++ b/src/stats/graphs/rjEvolution.cs
@@ -44,7 +44,7 @@ public class GraphRjEvolution : StatRjEvolution
                //we need to know the reactive with more jumps for prepare columns
                //later this value can be changed in stats/main/plotgraphgraphseries because 
                //there is possible to check the checked stats rows
-               maxJumps = SqliteStat.ObtainMaxNumberOfJumps(sessionString);
+               maxJumps = SqliteGeneral.SqliteStat.ObtainMaxNumberOfJumps(sessionString);
                
                this.dataColumns = maxJumps*2 + 2;      //for simplesession (index, (tv , tc)*jumps, fall)
                
diff --git a/src/stats/graphs/runIntervallic.cs b/src/stats/graphs/runIntervallic.cs
index 5715029..1a668a6 100644
--- a/src/stats/graphs/runIntervallic.cs
+++ b/src/stats/graphs/runIntervallic.cs
@@ -44,7 +44,7 @@ public class GraphRunIntervallic : StatRunIntervallic
                //we need to know the reactive with more runs for prepare columns
                //later this value can be changed in stats/main/plotgraphgraphseries because 
                //there is possible to check the checked stats rows
-               maxRuns = SqliteStat.ObtainMaxNumberOfRuns(sessionString);
+               maxRuns = SqliteGeneral.SqliteStat.ObtainMaxNumberOfRuns(sessionString);
                
                this.dataColumns = maxRuns + 1; //for simplesession (speedavg, speed*runs, )
                
diff --git a/src/stats/jumpSimpleSubtraction.cs b/src/stats/jumpSimpleSubtraction.cs
index a8d7b69..ee811d9 100644
--- a/src/stats/jumpSimpleSubtraction.cs
+++ b/src/stats/jumpSimpleSubtraction.cs
@@ -81,11 +81,11 @@ public class StatJumpSimpleSubtraction : Stat
                if(statsJumpsType == 3) { //avg of each jumper
                        if(multisession) {
                                processDataMultiSession ( 
-                                               SqliteStat.JumpSimpleSubtraction(sessionString, multisession, 
"AVG(", ")", test1, test2, showSex), 
+                                               SqliteGeneral.SqliteStat.JumpSimpleSubtraction(sessionString, 
multisession, "AVG(", ")", test1, test2, showSex), 
                                                true, sessions.Count);
                        } else {
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.JumpSimpleSubtraction(sessionString, 
multisession, "AVG(", ")", test1, test2, showSex), 
+                                                       
SqliteGeneral.SqliteStat.JumpSimpleSubtraction(sessionString, multisession, "AVG(", ")", test1, test2, 
showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
                        }
@@ -93,10 +93,10 @@ public class StatJumpSimpleSubtraction : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        //some of this options are never called becase we don't allow radiobutton all and 
limit (only avg and best)
                        if(multisession) {
-                               processDataMultiSession ( SqliteStat.JumpSimpleSubtraction(sessionString, 
multisession, "MAX(", ")", test1, test2, showSex),  
+                               processDataMultiSession ( 
SqliteGeneral.SqliteStat.JumpSimpleSubtraction(sessionString, multisession, "MAX(", ")", test1, test2, 
showSex),  
                                                true, sessions.Count);
                        } else {
-                               processDataSimpleSession ( SqliteStat.JumpSimpleSubtraction(sessionString, 
multisession, "MAX(", ")", test1, test2, showSex), 
+                               processDataSimpleSession ( 
SqliteGeneral.SqliteStat.JumpSimpleSubtraction(sessionString, multisession, "MAX(", ")", test1, test2, 
showSex), 
                                                true, dataColumns);
                        }
                }
diff --git a/src/stats/potency.cs b/src/stats/potency.cs
index 77387e2..f931ca3 100644
--- a/src/stats/potency.cs
+++ b/src/stats/potency.cs
@@ -89,13 +89,13 @@ public class StatPotency : Stat
                        if(multisession) {
                                string operation = "AVG";
                                processDataMultiSession ( 
-                                               SqliteStat.CmjPlusPotency(sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.CmjPlusPotency(sessionString, 
multisession, 
                                                        operation, jumpType, showSex, heightPreferred), 
                                                true, sessions.Count);
                        } else {
                                string operation = "AVG";
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.CmjPlusPotency(sessionString, 
multisession, 
+                                                       
SqliteGeneral.SqliteStat.CmjPlusPotency(sessionString, multisession, 
                                                                operation, jumpType, showSex, 
heightPreferred), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
@@ -105,14 +105,14 @@ public class StatPotency : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        if(multisession) {
                                string operation = "MAX";
-                               processDataMultiSession ( SqliteStat.Potency(indexType, sessionString, 
multisession, 
+                               processDataMultiSession ( SqliteGeneral.SqliteStat.Potency(indexType, 
sessionString, multisession, 
                                                        operation, jumpType, showSex, heightPreferred),  
                                                true, sessions.Count);
                        } else {
                                string operation = ""; //no need of "MAX", there's an order by jump.tv desc
                                                        //and cleanDontWanted will do his work
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.Potency(indexType, sessionString, 
multisession, 
+                                                       SqliteGeneral.SqliteStat.Potency(indexType, 
sessionString, multisession, 
                                                                operation, jumpType, showSex, 
heightPreferred), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
diff --git a/src/stats/rjAVGSD.cs b/src/stats/rjAVGSD.cs
index 289dbfa..3059845 100644
--- a/src/stats/rjAVGSD.cs
+++ b/src/stats/rjAVGSD.cs
@@ -79,12 +79,12 @@ public class StatRjAVGSD : Stat
                */
 
                string operation = ""; // cannot be avg in this statistic
-               int maxJumps = SqliteStat.ObtainMaxNumberOfJumps(sessionString);
+               int maxJumps = SqliteGeneral.SqliteStat.ObtainMaxNumberOfJumps(sessionString);
                
                processDataSimpleSession ( 
                                cleanDontWanted (
                                        convertTCsTFsCombinedToIndexAVGSD (
-                                               SqliteStat.RjEvolution(sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.RjEvolution(sessionString, 
multisession, 
                                                        operation, jumpType, showSex, maxJumps)), 
                                                statsJumpsType, limit),
                                false, dataColumns);
diff --git a/src/stats/rjEvolution.cs b/src/stats/rjEvolution.cs
index 30d36c2..0a17a2c 100644
--- a/src/stats/rjEvolution.cs
+++ b/src/stats/rjEvolution.cs
@@ -47,7 +47,7 @@ public class StatRjEvolution : Stat
                string sessionString = obtainSessionSqlString(sessions, "jumpRj");
 
                //we need to know the reactive with more jumps for prepare columns
-               maxJumps = SqliteStat.ObtainMaxNumberOfJumps(sessionString);
+               maxJumps = SqliteGeneral.SqliteStat.ObtainMaxNumberOfJumps(sessionString);
                
                this.dataColumns = maxJumps*2 + 2;      //for simplesession (index, fall, (tv , tc)*jumps)
 
@@ -243,7 +243,7 @@ public class StatRjEvolution : Stat
                string operation = ""; //no need of "MAX", there's an order by (index) desc
                //and cleanDontWanted will do his work
                processDataSimpleSession ( cleanDontWanted (
-                                       SqliteStat.RjEvolution(sessionString, multisession, 
+                                       SqliteGeneral.SqliteStat.RjEvolution(sessionString, multisession, 
                                                operation, jumpType, showSex, maxJumps), 
                                        statsJumpsType, limit),
                                false, dataColumns); //don't print AVG and SD at end of row (has no sense)
diff --git a/src/stats/rjPotencyBosco.cs b/src/stats/rjPotencyBosco.cs
index 37f0d4e..7eee963 100644
--- a/src/stats/rjPotencyBosco.cs
+++ b/src/stats/rjPotencyBosco.cs
@@ -76,14 +76,14 @@ public class StatRjPotencyBosco : Stat
                        if(multisession) {
                                string operation = "AVG";
                                processDataMultiSession ( 
-                                               SqliteStat.RjPotencyBosco(sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.RjPotencyBosco(sessionString, 
multisession, 
                                                        //"AVG(", ")", showSex), 
                                                        operation, jumpType, showSex), 
                                                true, sessions.Count);
                        } else {
                                string operation = "AVG";
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.RjPotencyBosco(sessionString, 
multisession, 
+                                                       
SqliteGeneral.SqliteStat.RjPotencyBosco(sessionString, multisession, 
                                                                //"AVG(", ")", showSex), 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
@@ -93,7 +93,7 @@ public class StatRjPotencyBosco : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        if(multisession) {
                                string operation = "MAX";
-                               processDataMultiSession ( SqliteStat.RjPotencyBosco(sessionString, 
multisession, 
+                               processDataMultiSession ( 
SqliteGeneral.SqliteStat.RjPotencyBosco(sessionString, multisession, 
                                                        //"MAX(", ")", showSex),  
                                                        operation, jumpType, showSex), 
                                                true, sessions.Count);
@@ -101,7 +101,7 @@ public class StatRjPotencyBosco : Stat
                                string operation = ""; //no need of "MAX", there's an order by (index) desc
                                                        //and clenaDontWanted will do his work
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.RjPotencyBosco(sessionString, 
multisession, 
+                                                       
SqliteGeneral.SqliteStat.RjPotencyBosco(sessionString, multisession, 
                                                                //"", "", showSex), 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
diff --git a/src/stats/runIntervallic.cs b/src/stats/runIntervallic.cs
index 8d7c06f..73a3e79 100644
--- a/src/stats/runIntervallic.cs
+++ b/src/stats/runIntervallic.cs
@@ -46,7 +46,7 @@ public class StatRunIntervallic : Stat
                string sessionString = obtainSessionSqlString(sessions, "runInterval");
 
                //we need to know the run with more tracks for prepare columns
-               maxRuns = SqliteStat.ObtainMaxNumberOfRuns(sessionString);
+               maxRuns = SqliteGeneral.SqliteStat.ObtainMaxNumberOfRuns(sessionString);
                
                this.dataColumns = maxRuns +1;  //for simplesession (avg speed, speed of each track)
 
@@ -230,7 +230,7 @@ public class StatRunIntervallic : Stat
                string operation = ""; //no need of "MAX", there's an order by (index) desc
                //and cleanDontWanted will do his work
                processDataSimpleSession ( cleanDontWanted (
-                                       SqliteStat.RunInterval(sessionString, multisession, 
+                                       SqliteGeneral.SqliteStat.RunInterval(sessionString, multisession, 
                                                operation, jumpType, showSex, maxRuns), 
                                        statsJumpsType, limit),
                                false, dataColumns); //TODO: maybe in future do avg and sd of speeds 
diff --git a/src/stats/runSimple.cs b/src/stats/runSimple.cs
index d5b9b0e..dac206b 100644
--- a/src/stats/runSimple.cs
+++ b/src/stats/runSimple.cs
@@ -73,13 +73,13 @@ public class StatRunSimple : Stat
                        if(multisession) {
                                string operation = "AVG";
                                processDataMultiSession ( 
-                                               SqliteStat.RunSimple(sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.RunSimple(sessionString, 
multisession, 
                                                        operation, jumpType, showSex), 
                                                true, sessions.Count);
                        } else {
                                string operation = "AVG";
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.RunSimple(sessionString, multisession, 
+                                                       SqliteGeneral.SqliteStat.RunSimple(sessionString, 
multisession, 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
@@ -88,7 +88,7 @@ public class StatRunSimple : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        if(multisession) {
                                string operation = "MAX";
-                               processDataMultiSession ( SqliteStat.RunSimple(sessionString, multisession, 
+                               processDataMultiSession ( SqliteGeneral.SqliteStat.RunSimple(sessionString, 
multisession, 
                                                        operation, jumpType, showSex),  
                                                true, sessions.Count);
                        } else {
@@ -96,7 +96,7 @@ public class StatRunSimple : Stat
                                                        //and clenaDontWanted will do his work
                                                        
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.RunSimple(sessionString, multisession, 
+                                                       SqliteGeneral.SqliteStat.RunSimple(sessionString, 
multisession, 
                                                                operation, jumpType, showSex), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
diff --git a/src/stats/sjCmjAbk.cs b/src/stats/sjCmjAbk.cs
index ef316d7..39e9a6a 100644
--- a/src/stats/sjCmjAbk.cs
+++ b/src/stats/sjCmjAbk.cs
@@ -73,13 +73,13 @@ public class StatSjCmjAbk : Stat
                        if(multisession) {
                                string operation = "AVG";
                                processDataMultiSession ( 
-                                               SqliteStat.SjCmjAbk(sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.SjCmjAbk(sessionString, 
multisession, 
                                                        operation, jumpType, showSex, heightPreferred), 
                                                true, sessions.Count);
                        } else {
                                string operation = "AVG";
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.SjCmjAbk(sessionString, multisession, 
+                                                       SqliteGeneral.SqliteStat.SjCmjAbk(sessionString, 
multisession, 
                                                                operation, jumpType, showSex, 
heightPreferred), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
@@ -88,7 +88,7 @@ public class StatSjCmjAbk : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        if(multisession) {
                                string operation = "MAX";
-                               processDataMultiSession ( SqliteStat.SjCmjAbk(sessionString, multisession, 
+                               processDataMultiSession ( SqliteGeneral.SqliteStat.SjCmjAbk(sessionString, 
multisession, 
                                                        operation, jumpType, showSex, heightPreferred),  
                                                true, sessions.Count);
                        } else {
@@ -96,7 +96,7 @@ public class StatSjCmjAbk : Stat
                                                        //and clenaDontWanted will do his work
                                                        
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.SjCmjAbk(sessionString, multisession, 
+                                                       SqliteGeneral.SqliteStat.SjCmjAbk(sessionString, 
multisession, 
                                                                operation, jumpType, showSex, 
heightPreferred), 
                                                        statsJumpsType, limit),
                                                true, dataColumns);
diff --git a/src/stats/sjCmjAbkPlus.cs b/src/stats/sjCmjAbkPlus.cs
index 27b82cc..973a463 100644
--- a/src/stats/sjCmjAbkPlus.cs
+++ b/src/stats/sjCmjAbkPlus.cs
@@ -89,14 +89,14 @@ public class StatSjCmjAbkPlus : Stat
                        if(multisession) {
                                string operation = "AVG";
                                processDataMultiSession ( 
-                                               SqliteStat.SjCmjAbkPlus(sessionString, multisession, 
+                                               SqliteGeneral.SqliteStat.SjCmjAbkPlus(sessionString, 
multisession, 
                                                        //operation, jumpType, showSex, percent, 
heightPreferred), 
                                                        operation, jumpType, showSex, heightPreferred, 
weightPercentPreferred), 
                                                true, sessions.Count);
                        } else {
                                string operation = "AVG";
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.SjCmjAbkPlus(sessionString, multisession, 
+                                                       SqliteGeneral.SqliteStat.SjCmjAbkPlus(sessionString, 
multisession, 
                                                                //operation, jumpType, showSex, percent, 
heightPreferred), 
                                                                operation, jumpType, showSex, 
heightPreferred, weightPercentPreferred), 
                                                        statsJumpsType, limit),
@@ -106,7 +106,7 @@ public class StatSjCmjAbkPlus : Stat
                        //if more than on session, show only the avg or max of each jump/jumper
                        if(multisession) {
                                string operation = "MAX";
-                               processDataMultiSession ( SqliteStat.SjCmjAbkPlus(sessionString, 
multisession, 
+                               processDataMultiSession ( 
SqliteGeneral.SqliteStat.SjCmjAbkPlus(sessionString, multisession, 
                                                        //operation, jumpType, showSex, percent, 
heightPreferred),  
                                                        operation, jumpType, showSex, heightPreferred, 
weightPercentPreferred),  
                                                true, sessions.Count);
@@ -114,7 +114,7 @@ public class StatSjCmjAbkPlus : Stat
                                string operation = ""; //no need of "MAX", there's an order by jump.tv desc
                                                        //and clenaDontWanted will do his work
                                processDataSimpleSession ( cleanDontWanted (
-                                                       SqliteStat.SjCmjAbkPlus(sessionString, multisession, 
+                                                       SqliteGeneral.SqliteStat.SjCmjAbkPlus(sessionString, 
multisession, 
                                                                //operation, jumpType, showSex, percent, 
heightPreferred), 
                                                                operation, jumpType, showSex, 
heightPreferred, weightPercentPreferred), 
                                                        statsJumpsType, limit),


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