[chronojump/database-refactoring: 1/5] WIP - Experiment: makes all the sqlite methods non-static.



commit b70e11999c125390fa3f4d016e3181a30b703659
Author: Carles Pina i Estany <carles pina cat>
Date:   Mon Sep 12 17:21:30 2016 +0100

    WIP - Experiment: makes all the sqlite methods non-static.
    
    This will allow us to have two sqlite objects at the same time and
    re-use them for some dialogs, with the help of a singleton for the
    transition (it might be too much work though, so just an experiment).
    
    At the moment this code doesn't compile yet.

 src/chronojump.cs                    |    2 +-
 src/sqlite/country.cs                |   14 ++--
 src/sqlite/encoder.cs                |   64 +++++++-------
 src/sqlite/event.cs                  |   14 ++--
 src/sqlite/executeAuto.cs            |    8 +-
 src/sqlite/jump.cs                   |   20 ++--
 src/sqlite/jumpRj.cs                 |   10 +-
 src/sqlite/jumpType.cs               |   38 ++++----
 src/sqlite/main.cs                   |  164 +++++++++++++++++++---------------
 src/sqlite/multiChronopic.cs         |   10 +-
 src/sqlite/oldConvert.cs             |   18 ++--
 src/sqlite/person.cs                 |   22 +++---
 src/sqlite/personSession.cs          |   22 +++---
 src/sqlite/personSessionNotUpload.cs |    8 +-
 src/sqlite/preferences.cs            |   16 ++--
 src/sqlite/pulse.cs                  |    8 +-
 src/sqlite/pulseType.cs              |   10 +-
 src/sqlite/reactionTime.cs           |    8 +-
 src/sqlite/run.cs                    |   10 +-
 src/sqlite/runInterval.cs            |    8 +-
 src/sqlite/runType.cs                |   46 +++++-----
 src/sqlite/server.cs                 |   18 ++--
 src/sqlite/session.cs                |   34 ++++----
 src/sqlite/speciallity.cs            |   14 ++--
 src/sqlite/sport.cs                  |   16 ++--
 src/sqlite/stat.cs                   |   34 ++++----
 26 files changed, 329 insertions(+), 307 deletions(-)
---
diff --git a/src/chronojump.cs b/src/chronojump.cs
index 60d9302..7a61910 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -157,7 +157,7 @@ public class ChronoJump
        string language = "";
        if(File.Exists(System.IO.Path.Combine(Util.GetDatabaseDir(), "chronojump.db"))) {
                try {
-                       Sqlite.Connect();
+                       SqliteForUser.Instance.Connect();
 
                        /*
                         * chronojump 1.5.2 converts DB 1.24 to 1.25 changing language to ""
diff --git a/src/sqlite/country.cs b/src/sqlite/country.cs
index 117a234..9ef36dc 100644
--- a/src/sqlite/country.cs
+++ b/src/sqlite/country.cs
@@ -32,7 +32,7 @@ using Mono.Unix;
 
 class SqliteCountry : Sqlite
 {
-       protected internal static void createTable()
+       protected internal void createTable()
         {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.CountryTable + " ( " +
@@ -44,7 +44,7 @@ class SqliteCountry : Sqlite
         }
 
        // intialize table
-       protected internal static void initialize()
+       protected internal  void initialize()
        {
                conversionSubRateTotal = countries.Length;
                conversionSubRate = 0;
@@ -71,7 +71,7 @@ class SqliteCountry : Sqlite
                        tr.Commit();
                }
        }
-       public static void Insert(bool dbconOpened, SqliteCommand mycmd, string code, string nameEnglish, 
string continent)
+       public void Insert(bool dbconOpened, SqliteCommand mycmd, string code, string nameEnglish, string 
continent)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -99,7 +99,7 @@ class SqliteCountry : Sqlite
                        Sqlite.Close();
        }
 
-       public static string [] SelectCountriesOfAContinent(string continent, bool insertUndefined)
+       public string [] SelectCountriesOfAContinent(string continent, bool insertUndefined)
        {
                Sqlite.Open();
                
@@ -134,7 +134,7 @@ class SqliteCountry : Sqlite
                return myReturn;
        }
        
-       public static string [] Select(int uniqueID)
+       public string [] Select(int uniqueID)
        {
                Sqlite.Open();
                
@@ -159,7 +159,7 @@ class SqliteCountry : Sqlite
        }
 
        //useful to convert DB from 0.57 to 0.58 (strip republic and kingdom stuff)
-       public static bool TableHasOldRepublicStuff() {
+       public bool TableHasOldRepublicStuff() {
                dbcmd.CommandText = "SELECT name FROM " + Constants.CountryTable + " WHERE code == \"DZA\"";
                
                LogB.SQL(dbcmd.CommandText.ToString());
@@ -188,7 +188,7 @@ class SqliteCountry : Sqlite
         * all this are obviously NOT user defined
         * last string is for graphLink
         */
-       private static string [] countries = {
+       private string [] countries = {
                //true or false means if it has speciallities
                Constants.CountryUndefined + ":" + Constants.CountryUndefined + ":" + 
Catalog.GetString(Constants.CountryUndefined) + ":" + Constants.CountryUndefined, //will be 1 (it's also 
written in Constants.CountryUndefinedID
                "Africa:" + "Algeria:" + Catalog.GetString("Algeria") + ":" + "DZA",
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index a413dce..c176b42 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -38,7 +38,7 @@ class SqliteEncoder : Sqlite
         * create and initialize tables
         */
        
-       protected internal static void createTableEncoder()
+       protected internal void createTableEncoder()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.EncoderTable + " ( " +
@@ -69,7 +69,7 @@ class SqliteEncoder : Sqlite
         * Encoder class methods
         */
        
-       public static int Insert(bool dbconOpened, EncoderSQL es)
+       public int Insert(bool dbconOpened, EncoderSQL es)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -108,16 +108,16 @@ class SqliteEncoder : Sqlite
        }
 
        //normal Update call dbcmd will be used 
-       public static void Update(bool dbconOpened, EncoderSQL es)
+       public void Update(bool dbconOpened, EncoderSQL es)
        {
                update(dbconOpened, es, dbcmd);
        }
        //Transaction Update call dbcmdTr will be used  
-       public static void Update(bool dbconOpened, EncoderSQL es, SqliteCommand dbcmdTr) 
+       public void Update(bool dbconOpened, EncoderSQL es, SqliteCommand dbcmdTr) 
        {
                update(dbconOpened, es, dbcmdTr);
        }
-       private static void update(bool dbconOpened, EncoderSQL es, SqliteCommand mycmd)
+       private void update(bool dbconOpened, EncoderSQL es, SqliteCommand mycmd)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -153,7 +153,7 @@ class SqliteEncoder : Sqlite
                        Sqlite.Close();
        }
        
-       public static int UpdateTransaction(ArrayList data, string [] checkboxes)
+       public int UpdateTransaction(ArrayList data, string [] checkboxes)
        {
                int count = 0;
                int countActive = 0;
@@ -204,7 +204,7 @@ class SqliteEncoder : Sqlite
        //orderIDascendent is good for all the situations except when we want to convert from 1.05 to 1.06
        //in that conversion, we want first the last ones, and later the previous
        //      (to delete them if they are old copies)
-       public static ArrayList Select (
+       public ArrayList Select (
                        bool dbconOpened, int uniqueID, int personID, int sessionID, Constants.EncoderGI 
encoderGI, 
                        int exerciseID, string signalOrCurve, EncoderSQL.Eccons ecconSelect,
                        bool onlyActive, bool orderIDascendent)
@@ -323,7 +323,7 @@ class SqliteEncoder : Sqlite
        
 
        //exerciseID can be -1 to get all exercises
-       public static ArrayList SelectCompareIntersession (bool dbconOpened, Constants.EncoderGI encoderGI, 
int exerciseID, int personID)
+       public ArrayList SelectCompareIntersession (bool dbconOpened, Constants.EncoderGI encoderGI, int 
exerciseID, int personID)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -461,7 +461,7 @@ class SqliteEncoder : Sqlite
                return array;
        }
        
-       public static ArrayList SelectSessionOverview (bool dbconOpened, Constants.EncoderGI encoderGI, int 
sessionID)
+       public ArrayList SelectSessionOverview (bool dbconOpened, Constants.EncoderGI encoderGI, int 
sessionID)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -524,7 +524,7 @@ class SqliteEncoder : Sqlite
         * EncoderSignalCurve
         */
        
-       protected internal static void createTableEncoderSignalCurve()
+       protected internal void createTableEncoderSignalCurve()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.EncoderSignalCurveTable + " ( " +
@@ -536,7 +536,7 @@ class SqliteEncoder : Sqlite
                dbcmd.ExecuteNonQuery();
        }
        
-       public static void SignalCurveInsert(bool dbconOpened, int signalID, int curveID, int msCentral)
+       public void SignalCurveInsert(bool dbconOpened, int signalID, int curveID, int msCentral)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -555,7 +555,7 @@ class SqliteEncoder : Sqlite
        //signalID == -1 (any signal)
        //curveID == -1 (any curve)
        //if msStart and msEnd != -1 (means find a curve with msCentral contained between both values)
-       public static ArrayList SelectSignalCurve (bool dbconOpened, int signalID, int curveID, double 
msStart, double msEnd)
+       public ArrayList SelectSignalCurve (bool dbconOpened, int signalID, int curveID, double msStart, 
double msEnd)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -609,7 +609,7 @@ class SqliteEncoder : Sqlite
                return array;
        }
 
-       public static void DeleteSignalCurveWithCurveID(bool dbconOpened, int curveID)
+       public void DeleteSignalCurveWithCurveID(bool dbconOpened, int curveID)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
@@ -625,7 +625,7 @@ class SqliteEncoder : Sqlite
        
        //when select from database, ensure path separators are ok for this platform
        //useful if person moved database between diff OS
-       private static string fixOSpath(string url) {
+       private string fixOSpath(string url) {
                if(UtilAll.IsWindows())
                        return url.Replace("/","\\");
                else
@@ -634,14 +634,14 @@ class SqliteEncoder : Sqlite
        //url and videoURL stored path is relative to be able to move data between computers
        //then SELECT: makes it abolute (addURLpath)
        //INSERT and UPDATE: makes it relative (removeURLpath)
-       private static string addURLpath(string url) {
+       private string addURLpath(string url) {
                string parentDir = Util.GetParentDir(true); //add final '/' or '\'
                if( ! url.StartsWith(parentDir) )
                        url = parentDir + url; 
 
                return url;
        }
-       private static string removeURLpath(string url) {
+       private string removeURLpath(string url) {
                string parentDir = Util.GetParentDir(true); //add final '/' or '\'
                if( url.StartsWith(parentDir) )
                        url = url.Replace(parentDir, ""); 
@@ -656,7 +656,7 @@ class SqliteEncoder : Sqlite
        
        
        //ressistance (weight bar, machine, goma, none, inertial, ...)
-       protected internal static void createTableEncoderExercise()
+       protected internal void createTableEncoderExercise()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.EncoderExerciseTable + " ( " +
@@ -671,7 +671,7 @@ class SqliteEncoder : Sqlite
                dbcmd.ExecuteNonQuery();
        }
        
-       public static void InsertExercise(bool dbconOpened, string name, int percentBodyWeight, 
+       public void InsertExercise(bool dbconOpened, string name, int percentBodyWeight, 
                        string ressistance, string description, string speed1RM)         //speed1RM decimal 
point = '.'
        {
                if(! dbconOpened)
@@ -691,7 +691,7 @@ class SqliteEncoder : Sqlite
        //Note: if this names change, or there are new, change them on both:
        //gui/encoder createEncoderCombos();    
        //gui/encoder on_button_encoder_exercise_add_accepted (object o, EventArgs args) 
-       protected internal static void initializeTableEncoderExercise()
+       protected internal void initializeTableEncoderExercise()
        {
                string [] iniEncoderExercises = {
                        //name:percentBodyWeight:ressistance:description:speed1RM:pullAngle:weightAngle
@@ -713,19 +713,19 @@ class SqliteEncoder : Sqlite
        private string ExerciseTranslatedBenchPress = Catalog.GetString("Bench press");
        private string ExerciseTranslatedSquat = Catalog.GetString("Squat");
        
-       protected internal static void addEncoderFreeExercise()
+       protected internal void addEncoderFreeExercise()
        {
                bool exists = Sqlite.Exists (true, Constants.EncoderExerciseTable, "Free");
                if(! exists)
                        InsertExercise(true, "Free", 0, "", "", "");
        }
-       protected internal static void addEncoderJumpExercise()
+       protected internal void addEncoderJumpExercise()
        {
                bool exists = Sqlite.Exists (true, Constants.EncoderExerciseTable, "Jump");
                if(! exists)
                        InsertExercise(true, "Jump", 100, "", "", "");
        }
-       protected internal static void addEncoderInclinedExercises()
+       protected internal void addEncoderInclinedExercises()
        {
                string [] iniEncoderExercises = {
                        //name:percentBodyWeight:ressistance:description:speed1RM:bodyAngle:weightAngle
@@ -739,7 +739,7 @@ class SqliteEncoder : Sqlite
                }
        }
 
-       public static void UpdateExercise(bool dbconOpened, string nameOld, string name, int 
percentBodyWeight, 
+       public void UpdateExercise(bool dbconOpened, string nameOld, string name, int percentBodyWeight, 
                        string ressistance, string description, string speed1RM)
        {
                if(! dbconOpened)
@@ -762,7 +762,7 @@ class SqliteEncoder : Sqlite
        
        //if uniqueID != -1, returns an especific EncoderExercise that can be read like this    
        //EncoderExercise ex = (EncoderExercise) SqliteEncoder.SelectEncoderExercises(eSQL.exerciseID)[0];
-       public static ArrayList SelectEncoderExercises(bool dbconOpened, int uniqueID, bool onlyNames) 
+       public ArrayList SelectEncoderExercises(bool dbconOpened, int uniqueID, bool onlyNames) 
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -816,7 +816,7 @@ class SqliteEncoder : Sqlite
        }
 
 
-       public static ArrayList SelectEncoderRowsOfAnExercise(bool dbconOpened, int exerciseID) 
+       public ArrayList SelectEncoderRowsOfAnExercise(bool dbconOpened, int exerciseID) 
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -857,7 +857,7 @@ class SqliteEncoder : Sqlite
        }
        
        //conversion from DB 0.99 to 1.00
-       protected internal static void putEncoderExerciseAnglesAt90() {
+       protected internal void putEncoderExerciseAnglesAt90() {
                dbcmd.CommandText = "UPDATE " + Constants.EncoderExerciseTable + 
                        " SET future2 = 90, future3 = 90";
 
@@ -866,7 +866,7 @@ class SqliteEncoder : Sqlite
        }
        
        //conversion from DB 1.02 to 1.03
-       protected internal static void removeEncoderExerciseAngles() {
+       protected internal void removeEncoderExerciseAngles() {
                dbcmd.CommandText = "UPDATE " + Constants.EncoderExerciseTable + 
                        " SET future2 = \"\", future3 = \"\"";
 
@@ -878,7 +878,7 @@ class SqliteEncoder : Sqlite
         * 1RM stuff
         */
 
-       protected internal static void createTable1RM()
+       protected internal void createTable1RM()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.Encoder1RMTable + " ( " +
@@ -893,7 +893,7 @@ class SqliteEncoder : Sqlite
                dbcmd.ExecuteNonQuery();
        }
        
-       public static int Insert1RM(bool dbconOpened, int personID, int sessionID, int exerciseID, double 
load1RM)      
+       public int Insert1RM(bool dbconOpened, int personID, int sessionID, int exerciseID, double load1RM)   
  
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -917,7 +917,7 @@ class SqliteEncoder : Sqlite
                return myLast;
        }
 
-       public static ArrayList Select1RM (bool dbconOpened, int personID, int sessionID, int exerciseID, 
bool returnPersonNameAndExerciseName)
+       public ArrayList Select1RM (bool dbconOpened, int personID, int sessionID, int exerciseID, bool 
returnPersonNameAndExerciseName)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -1017,7 +1017,7 @@ class SqliteEncoder : Sqlite
        //
        //as explained, following method is only used in conversions from 1.05 to 1.06
        //newly saved curves in 1.06 will write msCentral in EncoderSignalCurve table without needing this 
method
-       public static int FindCurveInSignal(string signalFile, string curveFile) 
+       public int FindCurveInSignal(string signalFile, string curveFile) 
        {
                int [] signalInts = Util.ReadFileAsInts(signalFile);
                /*      
@@ -1054,7 +1054,7 @@ class SqliteEncoder : Sqlite
         */
 
        //called on startup to load last encoderConfiguration
-       public static EncoderConfiguration LoadEncoderConfiguration()
+       public EncoderConfiguration LoadEncoderConfiguration()
        {
                string ecStr = SqlitePreferences.Select("encoderConfiguration", false);
                
diff --git a/src/sqlite/event.cs b/src/sqlite/event.cs
index a8c2e7b..fdb0fbd 100644
--- a/src/sqlite/event.cs
+++ b/src/sqlite/event.cs
@@ -34,7 +34,7 @@ class SqliteEvent : Sqlite
         * in the future this will not exist, and graphs will be in jumpType, runType, ... tables
         */
 
-       protected internal static void createGraphLinkTable()
+       protected internal void createGraphLinkTable()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE graphLinkTable ( " +
@@ -49,12 +49,12 @@ class SqliteEvent : Sqlite
        
        //called from some Chronojump methods
        //adds dbcmd to be used on next Insert method
-       public static int GraphLinkInsert(string tableName, string eventName, string graphFileName, bool 
dbconOpened) 
+       public int GraphLinkInsert(string tableName, string eventName, string graphFileName, bool 
dbconOpened) 
        {
                return GraphLinkInsert(tableName, eventName, graphFileName, dbconOpened, dbcmd);
        }
        //Called from initialize jump, jumpRj
-       public static int GraphLinkInsert(string tableName, string eventName, string graphFileName, bool 
dbconOpened, SqliteCommand mycmd)
+       public int GraphLinkInsert(string tableName, string eventName, string graphFileName, bool 
dbconOpened, SqliteCommand mycmd)
        {
                if(! dbconOpened) {
                        Sqlite.Open();
@@ -77,7 +77,7 @@ class SqliteEvent : Sqlite
        }
 
        //do not use this because some graph like the takeoff.png are not in this SQL table     
-       public static string GraphLinkSelectFileName(string tableName, string eventName)
+       public string GraphLinkSelectFileName(string tableName, string eventName)
        {
                Sqlite.Open();
 
@@ -101,7 +101,7 @@ class SqliteEvent : Sqlite
                
        //useful for passing serverUniqueID as simulated int
        //updating local test when it gets uploaded
-       public static void UpdateSimulated(bool dbconOpened, string tableName, int uniqueID, int simulated)
+       public void UpdateSimulated(bool dbconOpened, string tableName, int uniqueID, int simulated)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -117,14 +117,14 @@ class SqliteEvent : Sqlite
 
        //convertSimulate and simulateConvertToNegative as a part of db conversion to 0.60
        //0.59 - 0.60 (...) Simulated now are -1, because 0 is real and positive is serverUniqueID
-       private static void convertSimulate(string tableName)
+       private void convertSimulate(string tableName)
        {
                dbcmd.CommandText = "UPDATE " + tableName + " SET simulated = -1" + 
                        " WHERE simulated == 1";
                LogB.SQL(dbcmd.CommandText.ToString());
                dbcmd.ExecuteNonQuery();
        }
-       public static void SimulatedConvertToNegative() 
+       public void SimulatedConvertToNegative() 
        {
                convertSimulate(Constants.JumpTable);
                convertSimulate(Constants.JumpRjTable);
diff --git a/src/sqlite/executeAuto.cs b/src/sqlite/executeAuto.cs
index 75c4587..9268f42 100644
--- a/src/sqlite/executeAuto.cs
+++ b/src/sqlite/executeAuto.cs
@@ -36,7 +36,7 @@ class SqliteExecuteAuto : Sqlite
         * create and initialize tables
         */
        
-       protected internal static void createTableExecuteAuto()
+       protected internal void createTableExecuteAuto()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.ExecuteAutoTable + " ( " +
@@ -57,7 +57,7 @@ class SqliteExecuteAuto : Sqlite
         * class methods
         */
        
-       public static void Insert(bool dbconOpened, ExecuteAutoSQL eaSQL)
+       public void Insert(bool dbconOpened, ExecuteAutoSQL eaSQL)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -79,7 +79,7 @@ class SqliteExecuteAuto : Sqlite
                        Sqlite.Close();
        }
 
-       protected internal static void addChronojumpProfileAndBilateral()
+       protected internal void addChronojumpProfileAndBilateral()
        {
                string [] jumps = SqliteJumpType.SelectJumpTypes(true, "", "", false);
 
@@ -122,7 +122,7 @@ class SqliteExecuteAuto : Sqlite
 
        //uniqueID == -1 selects all ExecuteAutoSQLs
        //uniqueID > 0 selects one ExecuteAutoSQL       
-       public static List<ExecuteAutoSQL> Select(bool dbconOpened, int uniqueID) 
+       public List<ExecuteAutoSQL> Select(bool dbconOpened, int uniqueID) 
        {
                if(! dbconOpened)
                        Sqlite.Open();
diff --git a/src/sqlite/jump.cs b/src/sqlite/jump.cs
index dfc1be7..87f7090 100644
--- a/src/sqlite/jump.cs
+++ b/src/sqlite/jump.cs
@@ -64,8 +64,8 @@ class SqliteJump : Sqlite
         * Jump class methods
         */
        
-       //public static int Insert(int personID, int sessionID, string type, double tv, double tc, int fall, 
double weight, string limited, string description, int simulated)
-       public static int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int 
sessionID, string type, double tv, double tc, double fall, double weight, string description, double angle, 
int simulated)
+       //public int Insert(int personID, int sessionID, string type, double tv, double tc, int fall, double 
weight, string limited, string description, int simulated)
+       public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID, 
string type, double tv, double tc, double fall, double weight, string description, double angle, int 
simulated)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -99,7 +99,7 @@ class SqliteJump : Sqlite
        //if all persons, put -1 in personID
        //if all types put, "" in filterType
        //unlimited put -1 in limit
-       public static string[] SelectJumps(bool dbconOpened, int sessionID, int personID, string 
filterWeight, string filterType, 
+       public string[] SelectJumps(bool dbconOpened, int sessionID, int personID, string filterWeight, 
string filterType, 
                        Orders_by order, int limit) 
        {
                if(!dbconOpened)
@@ -189,7 +189,7 @@ class SqliteJump : Sqlite
                return myJumps;
        }
 
-       public static Jump SelectJumpData(int uniqueID, bool dbconOpened)
+       public Jump SelectJumpData(int uniqueID, bool dbconOpened)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -213,7 +213,7 @@ class SqliteJump : Sqlite
                return myJump;
        }
        
-       public static string [] SelectTestMaxStuff(int personID, JumpType jumpType) 
+       public string [] SelectTestMaxStuff(int personID, JumpType jumpType) 
        {
                double tc = 0.0;
                if(! jumpType.StartIn)
@@ -254,7 +254,7 @@ class SqliteJump : Sqlite
                return str;
        }
        
-       public static List<Double> SelectChronojumpProfile (int pID, int sID)
+       public List<Double> SelectChronojumpProfile (int pID, int sID)
        {
                string personID = pID.ToString();
                string sessionID = sID.ToString();
@@ -303,7 +303,7 @@ class SqliteJump : Sqlite
        }
 
 
-       public static void Update(int jumpID, string type, string tv, string tc, string fall, int personID, 
double weight, string description, double angle)
+       public void Update(int jumpID, string type, string tv, string tc, string fall, int personID, double 
weight, string description, double angle)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE jump SET personID = " + personID + 
@@ -320,7 +320,7 @@ class SqliteJump : Sqlite
                Sqlite.Close();
        }
 
-       public static void UpdateWeight(string tableName, int uniqueID, double weight)
+       public void UpdateWeight(string tableName, int uniqueID, double weight)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + tableName + " SET weight = " + Util.ConvertToPoint(weight) + 
@@ -330,7 +330,7 @@ class SqliteJump : Sqlite
                Sqlite.Close();
        }
 
-       public static void UpdateDescription(string tableName, int uniqueID, string description)
+       public void UpdateDescription(string tableName, int uniqueID, string description)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + tableName + " SET description = \"" + description + 
@@ -341,7 +341,7 @@ class SqliteJump : Sqlite
        }
 
        //onle for change SJ+ CMJ+ and ABK+ to SJl...
-       public static void ChangeWeightToL()
+       public void ChangeWeightToL()
        {
                dbcmd.CommandText = "UPDATE jump SET type = \"SJl\" WHERE type == \"SJ+\"";
                LogB.SQL(dbcmd.CommandText.ToString());
diff --git a/src/sqlite/jumpRj.cs b/src/sqlite/jumpRj.cs
index 670fa0a..26c0882 100644
--- a/src/sqlite/jumpRj.cs
+++ b/src/sqlite/jumpRj.cs
@@ -58,7 +58,7 @@ class SqliteJumpRj : SqliteJump
                dbcmd.ExecuteNonQuery();
        }
 
-       public static int Insert (bool dbconOpened, string tableName, string uniqueID, int personID, int 
sessionID, string type, double tvMax, double tcMax, double fall, double weight, string description, double 
tvAvg, double tcAvg, string tvString, string tcString, int jumps, double time, string limited, string 
angleString, int simulated )
+       public int Insert (bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID, 
string type, double tvMax, double tcMax, double fall, double weight, string description, double tvAvg, double 
tcAvg, string tvString, string tcString, int jumps, double time, string limited, string angleString, int 
simulated )
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -91,7 +91,7 @@ class SqliteJumpRj : SqliteJump
                return myLast;
        }
 
-       public new static string[] SelectJumps(bool dbconOpened, int sessionID, int personID, string 
filterWeight, string filterType) 
+       public new string[] SelectJumps(bool dbconOpened, int sessionID, int personID, string filterWeight, 
string filterType) 
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -176,7 +176,7 @@ class SqliteJumpRj : SqliteJump
                return myJumps;
        }
 
-       public static JumpRj SelectJumpData(string tableName, int uniqueID, bool dbconOpened)
+       public JumpRj SelectJumpData(string tableName, int uniqueID, bool dbconOpened)
        {
                //tableName is jumpRj or tempJumpRj
 
@@ -200,7 +200,7 @@ class SqliteJumpRj : SqliteJump
                return myJump;
        }
        
-       public static void Update(int jumpID, int personID, string fall, double weight, string description)
+       public void Update(int jumpID, int personID, string fall, double weight, string description)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE jumpRj SET personID = " + personID + 
@@ -215,7 +215,7 @@ class SqliteJumpRj : SqliteJump
 
        //checks if there are Rjs with different number of TCs than TFs
        //then repair database manually, and look if the jump is jumpLimited, and how many jumps there are 
defined
-       public static void FindBadRjs()
+       public void FindBadRjs()
        {
                Sqlite.Open();
 
diff --git a/src/sqlite/jumpType.cs b/src/sqlite/jumpType.cs
index d2fee6a..9516e6c 100644
--- a/src/sqlite/jumpType.cs
+++ b/src/sqlite/jumpType.cs
@@ -33,7 +33,7 @@ class SqliteJumpType : Sqlite
        
        //creates table containing the types of simple Jumps
        //following INT values are booleans
-       protected internal static void createTableJumpType()
+       protected internal void createTableJumpType()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.JumpTypeTable + " ( " +
@@ -46,7 +46,7 @@ class SqliteJumpType : Sqlite
        }
        
        //if this changes, jumpType.cs constructor should change 
-       protected internal static void initializeTableJumpType()
+       protected internal void initializeTableJumpType()
        {
                string [] iniJumpTypes = {
                        //name:startIn:weight:description
@@ -90,7 +90,7 @@ class SqliteJumpType : Sqlite
        //put the graph links on the db
        //don't put the full description because if the user changes language, description will be in old lang
        //description will be on src/jumpType
-       public static void AddGraphLinks() {
+       public void AddGraphLinks() {
                using(SqliteTransaction tr = dbcon.BeginTransaction())
                {
                        using (SqliteCommand dbcmdTr = dbcon.CreateCommand())
@@ -115,7 +115,7 @@ class SqliteJumpType : Sqlite
 
        //creates table containing the types of repetitive Jumps
        //following INT values are booleans
-       protected internal static void createTableJumpRjType()
+       protected internal void createTableJumpRjType()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.JumpRjTypeTable + " ( " +
@@ -139,7 +139,7 @@ class SqliteJumpType : Sqlite
        }
        
        //if this changes, jumpType.cs constructor should change 
-       protected internal static void initializeTableJumpRjType()
+       protected internal void initializeTableJumpRjType()
        {
                string [] iniJumpTypes = {
                        //name:startIn:weight:jumpsLimited:limitValue:description
@@ -167,7 +167,7 @@ class SqliteJumpType : Sqlite
                AddGraphLinksRj();      
        }
 
-       public static void AddGraphLinksRj() {
+       public void AddGraphLinksRj() {
                using(SqliteTransaction tr = dbcon.BeginTransaction())
                {
                        using (SqliteCommand dbcmdTr = dbcon.CreateCommand())
@@ -189,12 +189,12 @@ class SqliteJumpType : Sqlite
 
        //called from some Chronojump methods
        //adds dbcmd to be used on next Insert method
-       public static void JumpTypeInsert(string myJump, bool dbconOpened)
+       public void JumpTypeInsert(string myJump, bool dbconOpened)
        {
                JumpTypeInsert(myJump, dbconOpened, dbcmd);
        }
        //Called from initialize
-       public static void JumpTypeInsert(string myJump, bool dbconOpened, SqliteCommand mycmd)
+       public void JumpTypeInsert(string myJump, bool dbconOpened, SqliteCommand mycmd)
        {
                string [] myStr = myJump.Split(new char[] {':'});
                if(! dbconOpened) {
@@ -214,12 +214,12 @@ class SqliteJumpType : Sqlite
 
        //called from some Chronojump methods
        //adds dbcmd to be used on next Insert method
-       public static void JumpRjTypeInsert(string myJump, bool dbconOpened)
+       public void JumpRjTypeInsert(string myJump, bool dbconOpened)
        {
                JumpRjTypeInsert(myJump, dbconOpened, dbcmd);
        }
        //Called from initialize
-       public static void JumpRjTypeInsert(string myJump, bool dbconOpened, SqliteCommand mycmd)
+       public void JumpRjTypeInsert(string myJump, bool dbconOpened, SqliteCommand mycmd)
        {
                string [] myStr = myJump.Split(new char[] {':'});
                if(! dbconOpened) {
@@ -238,7 +238,7 @@ class SqliteJumpType : Sqlite
                }
        }
 
-       public static string[] SelectJumpTypes(bool dbconOpened, string allJumpsName, string filter, bool 
onlyName) 
+       public string[] SelectJumpTypes(bool dbconOpened, string allJumpsName, string filter, bool onlyName) 
        {
                //allJumpsName: add and "allJumpsName" value
                //filter: 
@@ -309,7 +309,7 @@ class SqliteJumpType : Sqlite
                return myTypes;
        }
 
-       public static string[] SelectJumpRjTypes(string allJumpsName, bool onlyName) 
+       public string[] SelectJumpRjTypes(string allJumpsName, bool onlyName) 
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT * " +
@@ -363,7 +363,7 @@ class SqliteJumpType : Sqlite
                return myTypes;
        }
        
-       public static JumpType SelectAndReturnJumpType(string typeName, bool dbconOpened) 
+       public JumpType SelectAndReturnJumpType(string typeName, bool dbconOpened) 
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -395,7 +395,7 @@ class SqliteJumpType : Sqlite
                return myJumpType;
        }
 
-       public static JumpType SelectAndReturnJumpRjType(string typeName, bool dbconOpened) 
+       public JumpType SelectAndReturnJumpRjType(string typeName, bool dbconOpened) 
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -439,7 +439,7 @@ class SqliteJumpType : Sqlite
        }
 
        //tableName is jumpType or jumpRjType
-       public static bool HasWeight(string tableName, string typeName) 
+       public bool HasWeight(string tableName, string typeName) 
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT weight " +
@@ -467,7 +467,7 @@ class SqliteJumpType : Sqlite
        }
 
        //we know if it has fall if it starts in 
-       public static bool HasFall(string tableName, string typeName) 
+       public bool HasFall(string tableName, string typeName) 
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT startIn " +
@@ -492,7 +492,7 @@ class SqliteJumpType : Sqlite
        }
 
        //updates name  
-       public static void Update(string nameOld, string nameNew)
+       public void Update(string nameOld, string nameNew)
        {
                //Sqlite.Open();
                dbcmd.CommandText = "UPDATE jumpType SET name = \"" + nameNew + 
@@ -502,7 +502,7 @@ class SqliteJumpType : Sqlite
                //Sqlite.Close();
        }
 
-       public static void UpdateOther(string column, string typeName, string newValue)
+       public void UpdateOther(string column, string typeName, string newValue)
        {
                //Sqlite.Open();
                dbcmd.CommandText = "UPDATE jumpType SET " + column + " = \"" + newValue + 
@@ -512,7 +512,7 @@ class SqliteJumpType : Sqlite
                //Sqlite.Close();
        }
        
-       public static void Delete(string tableName, string name, bool dbconOpened)
+       public void Delete(string tableName, string name, bool dbconOpened)
        {
                if(!dbconOpened)
                        Sqlite.Open();
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index da00c21..30ae343 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -27,54 +27,76 @@ using System.Diagnostics;   //for launching other process
 
 using Mono.Unix;
 
+public sealed class SqliteForUser
+{
+       private static readonly Sqlite instance = new Sqlite();
+
+       // Explicit static constructor to tell C# compiler
+       // not to mark type as beforefieldinit
+       static SqliteForUser()
+       {
+       }
+
+       private SqliteForUser()
+       {
+       }
+
+       public static Sqlite Instance
+       {
+               get
+               {
+                       return instance;
+               }
+       }
+} 
 
-class Sqlite
+public class Sqlite
 {
-       protected static SqliteConnection dbcon;
-       protected static SqliteCommand dbcmd;
+       protected SqliteConnection dbcon;
+       protected SqliteCommand dbcmd;
 
        //since we use installJammer (chronojump 0.7)   
        //database was on c:\.chronojump\ or in ~/.chronojump
        //now it's on installed dir, eg linux: ~/Chronojump/database
-       private static string home = Util.GetDatabaseDir();
-       private static string sqlFile = home + Path.DirectorySeparatorChar + "chronojump.db";
+       private string home = Util.GetDatabaseDir();
+       private string sqlFile = home + Path.DirectorySeparatorChar + "chronojump.db";
        
-       private static string temp = Util.GetDatabaseTempDir();
-       private static string sqlFileTemp = temp + Path.DirectorySeparatorChar + "chronojump.db";
+       private string temp = Util.GetDatabaseTempDir();
+       private string sqlFileTemp = temp + Path.DirectorySeparatorChar + "chronojump.db";
 
        //http://www.mono-project.com/SQLite
 
-       static string connectionString = "version = 3; Data source = " + sqlFile;
-       static string connectionStringTemp = "version = 3; Data source = " + sqlFileTemp;
+       string connectionString = "version = 3; Data source = " + sqlFile;
+       string connectionStringTemp = "version = 3; Data source = " + sqlFileTemp;
 
        //test to try to open db in a dir with accents (latin)
-       //static string connectionString = "globalization requestEncoding=\"iso-8859-1\"; 
responseEncoding=\"iso-8859-1\"; fileEncoding=\"iso-8859-1\"; culture=\"es-ES\";version = 3; Data source = " 
+ sqlFile;
+       //string connectionString = "globalization requestEncoding=\"iso-8859-1\"; 
responseEncoding=\"iso-8859-1\"; fileEncoding=\"iso-8859-1\"; culture=\"es-ES\";version = 3; Data source = " 
+ sqlFile;
        
        //create blank database
-       static bool creatingBlankDatabase = false;
+       bool creatingBlankDatabase = false;
 
        
        public enum Orders_by { DEFAULT, ID_DESC }
 
        //for db creation
-       static int creationRate;
-       static int creationTotal;
+       int creationRate;
+       int creationTotal;
 
        //for db conversion
-       static string currentVersion = "0";
+       string currentVersion = "0";
        
-       static int conversionRate;
-       static int conversionRateTotal;
-       protected static int conversionSubRate;
-       protected static int conversionSubRateTotal;
+       int conversionRate;
+       int conversionRateTotal;
+       protected int conversionSubRate;
+       protected int conversionSubRateTotal;
 
-       public static bool IsOpened = false;
-       public static bool SafeClose = true;
+       public bool IsOpened = false;
+       public bool SafeClose = true;
 
        /*
         * Important, change this if there's any update to database
         */
-       static string lastChronojumpDatabaseVersion = "1.32";
+       string lastChronojumpDatabaseVersion = "1.32";
 
        public Sqlite() {
        }
@@ -90,7 +112,7 @@ class Sqlite
 
        //these two methods are used by methods who want to leave the connection opened
        //because lots of similar transactions have to be done
-       public static void Open()
+       public void Open()
        {
                try {
                        LogB.SQLon();
@@ -109,7 +131,7 @@ class Sqlite
                
                IsOpened = true;
        }
-       public static void Close()
+       public void Close()
        {
                LogB.SQLoff();
                        
@@ -127,7 +149,7 @@ class Sqlite
                IsOpened = false;
        }
 
-       public static bool Connect()
+       public bool Connect()
        {
                /*
               splashMessage = "pre";
@@ -222,7 +244,7 @@ class Sqlite
        }
 
        //only create blank DB
-       public static void ConnectBlank()
+       public void ConnectBlank()
        {
                string sqlFileBlank = "chronojump_blank.db"; //copied on /chronojump-x.y/data installjammer 
will copy it to database
                string connectionStringBlank = "version = 3; Data source = " + sqlFileBlank;
@@ -246,7 +268,7 @@ class Sqlite
                creatingBlankDatabase = true; 
        }
        
-       public static void CreateDir()
+       public void CreateDir()
        {
                LogB.SQL(connectionString);
 
@@ -264,7 +286,7 @@ class Sqlite
                LogB.SQL("Dirs created.");
        }
 
-       public static void CreateFile()
+       public void CreateFile()
        {
                LogB.SQL("creating file...");
                LogB.SQL(connectionString);
@@ -287,7 +309,7 @@ class Sqlite
        }
        
 
-       public static bool CheckTables(bool defaultDBLocation)
+       public bool CheckTables(bool defaultDBLocation)
        {
                if(defaultDBLocation) {
                        if (File.Exists(sqlFile)){
@@ -310,7 +332,7 @@ class Sqlite
        }
 
 
-       public static bool IsSqlite3() {
+       public bool IsSqlite3() {
                if(sqlite3SelectWorks()){
                        LogB.SQL("SQLITE3");
                        Sqlite.Close();
@@ -331,7 +353,7 @@ class Sqlite
                        return false;
                }
        }
-       private static bool sqlite3SelectWorks() {
+       private bool sqlite3SelectWorks() {
                try {
                        SqlitePreferences.Select("chronopicPort");
                } catch {
@@ -358,7 +380,7 @@ class Sqlite
                }
                return true;
        }
-       private static bool sqlite2SelectWorks() {
+       private bool sqlite2SelectWorks() {
                /*
                 *it says:
                 Unhandled Exception: System.NotSupportedException: Only Sqlite Version 3 is supported at 
this time
@@ -378,7 +400,7 @@ class Sqlite
        }
 
 
-       public static bool ConvertFromSqlite2To3() {
+       public bool ConvertFromSqlite2To3() {
                /*
                 * 1 write the sqlite2 dumped data to an archive
                 * 2 copy db
@@ -453,7 +475,7 @@ class Sqlite
        }
 
        //for splashWin text
-       public static string PrintConversionText() {
+       public string PrintConversionText() {
                double toReach = Convert.ToDouble(Util.ChangeDecimalSeparator(lastChronojumpDatabaseVersion));
                return currentVersion + "/" + toReach.ToString() + " " +
                        conversionRate.ToString() + "/" + conversionRateTotal.ToString() + " " +
@@ -461,23 +483,23 @@ class Sqlite
        }
 
        //for splashWin progressbars
-       public static double PrintCreation() {
+       public double PrintCreation() {
                return Util.DivideSafeFraction(creationRate, creationTotal);
        }
-       public static double PrintConversionVersion() {
+       public double PrintConversionVersion() {
                return Util.DivideSafeFraction(
                                Convert.ToDouble(Util.ChangeDecimalSeparator(currentVersion)), 
                                Convert.ToDouble(Util.ChangeDecimalSeparator(lastChronojumpDatabaseVersion))
                                );
        }
-       public static double PrintConversionRate() {
+       public double PrintConversionRate() {
                return Util.DivideSafeFraction(conversionRate, conversionRateTotal);
        }
-       public static double PrintConversionSubRate() {
+       public double PrintConversionSubRate() {
                return Util.DivideSafeFraction(conversionSubRate, conversionSubRateTotal);
        }
 
-       public static bool ConvertToLastChronojumpDBVersion() {
+       public bool ConvertToLastChronojumpDBVersion() {
                LogB.SQL("SelectChronojumpProfile ()");
 
                //if(checkIfIsSqlite2())
@@ -1914,12 +1936,12 @@ class Sqlite
                return returnSoftwareIsNew;
        }
        
-       private static string updateVersion(string newVersion) {
+       private string updateVersion(string newVersion) {
                SqlitePreferences.Update ("databaseVersion", newVersion, true); 
                return newVersion;
        }
 
-       public static bool ChangeDjToDJna() {
+       public bool ChangeDjToDJna() {
                string v = SqlitePreferences.Select("databaseVersion");
                LogB.SQL(Convert.ToDouble(Util.ChangeDecimalSeparator(v)).ToString());
                if(Convert.ToDouble(Util.ChangeDecimalSeparator(v)) < 
Convert.ToDouble(Util.ChangeDecimalSeparator("0.74")))
@@ -1927,7 +1949,7 @@ class Sqlite
                return false;
        }
 
-       private static void addChronopicPortNameIfNotExists() {
+       private void addChronopicPortNameIfNotExists() {
                string myPort = SqlitePreferences.Select("chronopicPort");
                if(myPort == "0") {
                        //if doesn't exist (for any reason, like old database)
@@ -1942,7 +1964,7 @@ class Sqlite
                }
        }
        
-       public static void CreateTables(bool server)
+       public void CreateTables(bool server)
        {
                Sqlite.Open();
 
@@ -2156,7 +2178,7 @@ class Sqlite
                creationRate ++;
        }
 
-       public static bool Exists(bool dbconOpened, string tableName, string findName)
+       public bool Exists(bool dbconOpened, string tableName, string findName)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -2183,7 +2205,7 @@ class Sqlite
                return exists;
        }
 
-       public static string SQLBuildQueryString (string tableName, string test, string variable,
+       public string SQLBuildQueryString (string tableName, string test, string variable,
                        int sex, string ageInterval,
                        int countryID, int sportID, int speciallityID, int levelID, int evaluatorID)
        {
@@ -2250,7 +2272,7 @@ class Sqlite
        /* 
         * temp data stuff
         */
-       public static int TempDataExists(string tableName)
+       public int TempDataExists(string tableName)
        {
                //tableName can be tempJumpRj or tempRunInterval
                
@@ -2277,7 +2299,7 @@ class Sqlite
                return exists;
        }
 
-       public static void DeleteTempEvents(string tableName)
+       public void DeleteTempEvents(string tableName)
        {
                //tableName can be tempJumpRj or tempRunInterval
 
@@ -2289,12 +2311,12 @@ class Sqlite
                Sqlite.Close();
        }
 
-       protected static void dropTable(string tableName) {
+       protected void dropTable(string tableName) {
                dbcmd.CommandText = "DROP TABLE " + tableName;
                dbcmd.ExecuteNonQuery();
        }
                                
-       protected static void convertPersonAndPersonSessionTo77() {
+       protected void convertPersonAndPersonSessionTo77() {
                //create person77
                SqlitePerson sqlitePersonObject = new SqlitePerson();
                sqlitePersonObject.createTable(Constants.PersonTable);
@@ -2354,7 +2376,7 @@ class Sqlite
 
 
        //to convert to sqlite 0.72
-       protected internal static void datesToYYYYMMDD()
+       protected internal void datesToYYYYMMDD()
        {
                conversionRateTotal = 4;
                conversionRate = 1;
@@ -2446,7 +2468,7 @@ class Sqlite
        }
 
        //used to delete persons (if needed) when a session is deleted. See SqliteSession.DeleteAllStuff
-       protected internal static void deleteOrphanedPersons()
+       protected internal void deleteOrphanedPersons()
        {
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.PersonTable;
                LogB.SQL(dbcmd.CommandText.ToString());
@@ -2470,7 +2492,7 @@ class Sqlite
        //used to delete persons (if needed) when a session is deleted. See SqliteSession.DeleteAllStuff
        //also used to convert to sqlite 0.73
        //this is old method (before .77), now use above method
-       protected internal static void deleteOrphanedPersonsOld()
+       protected internal void deleteOrphanedPersonsOld()
        {
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.PersonOldTable;
                LogB.SQL(dbcmd.CommandText.ToString());
@@ -2492,7 +2514,7 @@ class Sqlite
        }
                                
        //used to convert to sqlite 0.74
-       protected internal static void convertDJInDJna()
+       protected internal void convertDJInDJna()
        {
                //Dja exists in DB? (user defined)
                if(Exists(false, Constants.JumpTypeTable, "DJa")) {
@@ -2557,7 +2579,7 @@ class Sqlite
         * The best seem to have a boolean that indicates if certain conversion has done before
         * (see bool runAndRunIntervalInitialSpeedAdded)
         */
-       protected internal static void convertTables(Sqlite sqliteObject, string tableName, int 
columnsBefore, ArrayList columnsToAdd, bool putDescriptionInMiddle) 
+       protected internal void convertTables(Sqlite sqliteObject, string tableName, int columnsBefore, 
ArrayList columnsToAdd, bool putDescriptionInMiddle) 
        {
                conversionSubRate = 1;
                conversionSubRateTotal = -1; //unknown yet
@@ -2722,7 +2744,7 @@ LogB.SQL("5" + tableName);
         * if we don't use this, and we have created a column as int, and introduce floats or doubles, 
         * we can insert ok the float or doubles, but on select we will have ints
         */
-       protected internal static void alterTableColumn(Sqlite sqliteObject, string tableName, int columns) 
+       protected internal void alterTableColumn(Sqlite sqliteObject, string tableName, int columns) 
        {
                conversionSubRate = 1;
                conversionSubRateTotal = -1; //unknown yet
@@ -2791,14 +2813,14 @@ LogB.SQL("5" + tableName);
                Sqlite.dropTable(Constants.ConvertTempTable);
        }
 
-       protected static string [] DataReaderToStringArray (SqliteDataReader reader, int columns) {
+       protected string [] DataReaderToStringArray (SqliteDataReader reader, int columns) {
                string [] myReaderStr = new String[columns];
                for (int i=0; i < columns; i ++)
                        myReaderStr[i] = reader[i].ToString();
                return myReaderStr;
        }
 
-       protected static IDNameList fillIDNameList(string selectStr) 
+       protected IDNameList fillIDNameList(string selectStr) 
        {
                //select personID and jump type 'SJ' mean
                dbcmd.CommandText = selectStr;
@@ -2820,7 +2842,7 @@ LogB.SQL("5" + tableName);
                return list;
        }
 
-       protected static IDDoubleList fillIDDoubleList(string selectStr) 
+       protected IDDoubleList fillIDDoubleList(string selectStr) 
        {
                //select personID and jump type 'SJ' mean
                dbcmd.CommandText = selectStr;
@@ -2841,7 +2863,7 @@ LogB.SQL("5" + tableName);
 
        /* methods for different classes */
        
-       protected static double selectDouble (string sqlSelect) 
+       protected double selectDouble (string sqlSelect) 
        {
                dbcmd.CommandText = sqlSelect;
                LogB.SQL(dbcmd.CommandText.ToString());
@@ -2860,7 +2882,7 @@ LogB.SQL("5" + tableName);
        }
 
 
-       public static int Max (string tableName, string column, bool dbconOpened)
+       public int Max (string tableName, string column, bool dbconOpened)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -2882,7 +2904,7 @@ LogB.SQL("5" + tableName);
                return myReturn;
        }
 
-       public static int Count (string tableName, bool dbconOpened)
+       public int Count (string tableName, bool dbconOpened)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -2903,7 +2925,7 @@ LogB.SQL("5" + tableName);
                return myReturn;
        }
 
-       public static int CountCondition (string tableName, bool dbconOpened, string condition, string 
operand, string myValue) {
+       public int CountCondition (string tableName, bool dbconOpened, string condition, string operand, 
string myValue) {
                if(!dbconOpened)
                        Sqlite.Open();
 
@@ -2925,7 +2947,7 @@ LogB.SQL("5" + tableName);
        }
 
        //if we want to use the condition2 but not the searchValue, leave this as ""
-       public static void Update(
+       public void Update(
                        bool dbconOpened, string tableName, string columnName, 
                        string searchValue, string newValue, 
                        string columnNameCondition2, string searchValueCondition2)
@@ -2964,7 +2986,7 @@ LogB.SQL("5" + tableName);
                        Sqlite.Close();
        }
 
-       public static void Delete(bool dbconOpened, string tableName, int uniqueID)
+       public void Delete(bool dbconOpened, string tableName, int uniqueID)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
@@ -2978,7 +3000,7 @@ LogB.SQL("5" + tableName);
                        Sqlite.Close();
        }
        
-       public static void DeleteSelectingField(bool dbconOpened, string tableName, string fieldName, string 
id)
+       public void DeleteSelectingField(bool dbconOpened, string tableName, string fieldName, string id)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
@@ -2993,7 +3015,7 @@ LogB.SQL("5" + tableName);
        }
 
 
-       public static void DeleteFromName(bool dbconOpened, string tableName, string name)
+       public void DeleteFromName(bool dbconOpened, string tableName, string name)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
@@ -3007,7 +3029,7 @@ LogB.SQL("5" + tableName);
                        Sqlite.Close();
        }
 
-       public static void DeleteFromAnInt(bool dbconOpened, string tableName, string colName, int id)
+       public void DeleteFromAnInt(bool dbconOpened, string tableName, string colName, int id)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
@@ -3028,24 +3050,24 @@ LogB.SQL("5" + tableName);
         * SERVER STUFF
         */
        
-       public static string sqlFileServer = home + Path.DirectorySeparatorChar + "chronojump_server.db";
-       static string connectionStringServer = "version = 3; Data source = " + sqlFileServer;
+       public string sqlFileServer = home + Path.DirectorySeparatorChar + "chronojump_server.db";
+       string connectionStringServer = "version = 3; Data source = " + sqlFileServer;
        
-       public static bool CheckFileServer(){
+       public bool CheckFileServer(){
                if (File.Exists(sqlFileServer))
                        return true;
                else
                        return false;
        }
        
-       public static void ConnectServer()
+       public void ConnectServer()
        {
                dbcon = new SqliteConnection();
                dbcon.ConnectionString = connectionStringServer;
                dbcmd = dbcon.CreateCommand();
        }
        
-       public static bool DisConnect() {
+       public bool DisConnect() {
                try {
                        Sqlite.Close();
                } catch {
diff --git a/src/sqlite/multiChronopic.cs b/src/sqlite/multiChronopic.cs
index 3126792..327b680 100644
--- a/src/sqlite/multiChronopic.cs
+++ b/src/sqlite/multiChronopic.cs
@@ -67,7 +67,7 @@ class SqliteMultiChronopic : Sqlite
         * multiChronopic class methods
         */
 
-       public static int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int 
sessionID, string type, 
+       public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID, 
string type, 
                        int cp1StartedIn, int cp2StartedIn, int cp3StartedIn, int cp4StartedIn,
                        string cp1InStr, string cp1OutStr,
                        string cp2InStr, string cp2OutStr,
@@ -113,7 +113,7 @@ class SqliteMultiChronopic : Sqlite
        }
 
        //if all persons, put -1 in personID
-       public static string[] SelectTests(bool dbconOpened, int sessionID, int personID) 
+       public string[] SelectTests(bool dbconOpened, int sessionID, int personID) 
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -183,7 +183,7 @@ class SqliteMultiChronopic : Sqlite
                return myEvents;
        }
 
-       public static MultiChronopic SelectMultiChronopicData(int uniqueID, bool dbconOpened)
+       public MultiChronopic SelectMultiChronopicData(int uniqueID, bool dbconOpened)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -206,7 +206,7 @@ class SqliteMultiChronopic : Sqlite
                return mc;
        }
 
-       public static int MaxCPs(bool dbconOpened, int sessionID)
+       public int MaxCPs(bool dbconOpened, int sessionID)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -241,7 +241,7 @@ class SqliteMultiChronopic : Sqlite
                return maxCPs;
        }
 
-       public static void Update(int eventID, int personID, string vars, string description)
+       public void Update(int eventID, int personID, string vars, string description)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + Constants.MultiChronopicTable + " SET personID = " + personID 
+ 
diff --git a/src/sqlite/oldConvert.cs b/src/sqlite/oldConvert.cs
index 86d2056..fe63edb 100644
--- a/src/sqlite/oldConvert.cs
+++ b/src/sqlite/oldConvert.cs
@@ -42,7 +42,7 @@ class SqliteOldConvert : Sqlite
         * Following  method: is to restore signals that lost their videoURL value
         */
 
-       public static void FixLostVideoURLAfterEncoderRecalculate()
+       public void FixLostVideoURLAfterEncoderRecalculate()
        {
                dbcmd.CommandText = "SELECT eSignal.uniqueID, eCurve.videoURL " + 
                        "FROM encoder AS eSignal, encoder AS eCurve, encoderSignalCurve " + 
@@ -75,7 +75,7 @@ class SqliteOldConvert : Sqlite
        //to be easier to move data between computers, absolute paths have to be converted to relative
        //DB 1.11 -> 1.12
        //dbcon is already opened
-       public static void ConvertAbsolutePathsToRelative () 
+       public void ConvertAbsolutePathsToRelative () 
        {
                //get parentDir with the final '/' or '\'
                string parentDir = Util.GetParentDir(true);
@@ -86,7 +86,7 @@ class SqliteOldConvert : Sqlite
                //URLs of videos of contact tests: jump, run,... are not in the database
                //URLs of images of person77                     are not in the database
        }
-       public static void ConvertAbsolutePathsToRelativeDo (string parentDir, string table, string column) {
+       public void ConvertAbsolutePathsToRelativeDo (string parentDir, string table, string column) {
                //eg. dbcmd.CommandText = "UPDATE encoder SET videoURL = replace( videoURL, 
'/home/user/.local/share/Chronojump/', '' ) " + 
                //      "WHERE videoURL LIKE '/home/user/.local/share/Chronojump/%'";
 
@@ -100,7 +100,7 @@ class SqliteOldConvert : Sqlite
 
        //convert slCMJ to slCMJleft, slCMJright
        //DB 1.13 -> DB 1.14
-       public static void slCMJDivide() {
+       public void slCMJDivide() {
                //it's a conversion, dbcon is opened
 
                //changes on jumpType table
@@ -134,7 +134,7 @@ class SqliteOldConvert : Sqlite
        //personID can be -1 to get all on that session
        //sessionID can be -1 to get all sessions
        //signalOrCurve can be "all"
-       public static ArrayList EncoderSelect103 (bool dbconOpened, 
+       public ArrayList EncoderSelect103 (bool dbconOpened, 
                        int uniqueID, int personID, int sessionID, string signalOrCurve, bool onlyActive)
        {
                if(! dbconOpened)
@@ -218,7 +218,7 @@ class SqliteOldConvert : Sqlite
                return array;
        }
        
-       protected internal static void createTableEncoder104()
+       protected internal void createTableEncoder104()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.EncoderTable + " ( " +
@@ -244,7 +244,7 @@ class SqliteOldConvert : Sqlite
                dbcmd.ExecuteNonQuery();
        }
 
-       protected internal static void createTableEncoder99()
+       protected internal void createTableEncoder99()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.EncoderTable + " ( " +
@@ -281,7 +281,7 @@ class SqliteOldConvert : Sqlite
        //personID can be -1 to get all on that session
        //sessionID can be -1 to get all sessions
        //signalOrCurve can be "all"
-       public static ArrayList EncoderSelect098 (bool dbconOpened, 
+       public ArrayList EncoderSelect098 (bool dbconOpened, 
                        int uniqueID, int personID, int sessionID, string signalOrCurve, bool onlyActive)
        {
                if(! dbconOpened)
@@ -361,7 +361,7 @@ class SqliteOldConvert : Sqlite
        }
 
        //DB 1.17 -> 1.18       
-       protected internal static void deleteNegativeRuns() 
+       protected internal void deleteNegativeRuns() 
        {
                dbcmd.CommandText = "Delete FROM " + Constants.RunIntervalTable +
                        " WHERE timeTotal < 0";
diff --git a/src/sqlite/person.cs b/src/sqlite/person.cs
index 6ec191a..6ba152a 100644
--- a/src/sqlite/person.cs
+++ b/src/sqlite/person.cs
@@ -34,7 +34,7 @@ class SqlitePerson : Sqlite
 
        //can be "Constants.PersonTable" or "Constants.ConvertTempTable"
        //temp is used to modify table between different database versions if needed
-       //protected new internal static void createTable(string tableName)
+       //protected new internal void createTable(string tableName)
        protected override void createTable(string tableName)
         {
                dbcmd.CommandText = 
@@ -52,7 +52,7 @@ class SqlitePerson : Sqlite
                dbcmd.ExecuteNonQuery();
         }
 
-       public static int Insert(bool dbconOpened, string uniqueID, string name, string sex, DateTime 
dateBorn, 
+       public int Insert(bool dbconOpened, string uniqueID, string name, string sex, DateTime dateBorn, 
                        int race, int countryID, string description, int serverUniqueID)
        {
                LogB.SQL("going to insert");
@@ -88,10 +88,10 @@ class SqlitePerson : Sqlite
 
        //This is like SqlitePersonSession.Selectbut this returns a Person
        
-       public static Person Select(int uniqueID) {
+       public Person Select(int uniqueID) {
                return Select(false, uniqueID);
        }
-       public static Person Select(bool dbconOpened, int uniqueID)
+       public Person Select(bool dbconOpened, int uniqueID)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -124,9 +124,9 @@ class SqlitePerson : Sqlite
                return p;
        }
                
-       //public static string SelectJumperName(int uniqueID)
+       //public string SelectJumperName(int uniqueID)
        //select strings
-       public static string SelectAttribute(int uniqueID, string attribute)
+       public string SelectAttribute(int uniqueID, string attribute)
        {
                Sqlite.Open();
 
@@ -148,7 +148,7 @@ class SqlitePerson : Sqlite
        }
                
        //currently only used on server
-       public static ArrayList SelectAllPersons() 
+       public ArrayList SelectAllPersons() 
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT uniqueID, name FROM " + Constants.PersonTable; 
@@ -167,7 +167,7 @@ class SqlitePerson : Sqlite
                return myArray;
        }
                
-       public static ArrayList SelectAllPersonsRecuperable(string sortedBy, int except, int inSession, 
string searchFilterName) 
+       public ArrayList SelectAllPersonsRecuperable(string sortedBy, int except, int inSession, string 
searchFilterName) 
        {
                //sortedBy = name or uniqueID (= creation date)
        
@@ -269,7 +269,7 @@ finishForeach:
                return arrayReturn;
        }
 
-       public static ArrayList SelectAllPersonEvents(int personID) 
+       public ArrayList SelectAllPersonEvents(int personID) 
        {
                SqliteDataReader reader;
                ArrayList arraySessions = new ArrayList(2);
@@ -536,7 +536,7 @@ finishForeach:
                return arrayAll;
        }
        
-       public static bool ExistsAndItsNotMe(int uniqueID, string personName)
+       public bool ExistsAndItsNotMe(int uniqueID, string personName)
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT uniqueID FROM " + Constants.PersonTable +
@@ -562,7 +562,7 @@ finishForeach:
        }
        
        
-       public static void Update(Person myPerson)
+       public void Update(Person myPerson)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + Constants.PersonTable + 
diff --git a/src/sqlite/personSession.cs b/src/sqlite/personSession.cs
index e4207c2..d16deab 100644
--- a/src/sqlite/personSession.cs
+++ b/src/sqlite/personSession.cs
@@ -52,7 +52,7 @@ class SqlitePersonSession : Sqlite
                dbcmd.ExecuteNonQuery();
         }
 
-       public static int Insert(bool dbconOpened, string uniqueID, int personID, int sessionID, 
+       public int Insert(bool dbconOpened, string uniqueID, int personID, int sessionID, 
                        double height, double weight, int sportID, int speciallityID, int practice,
                        string comments) 
        {
@@ -89,7 +89,7 @@ class SqlitePersonSession : Sqlite
        
        //we KNOW session
        //select doubles
-       public static double SelectAttribute(bool dbconOpened, int personID, int sessionID, string attribute)
+       public double SelectAttribute(bool dbconOpened, int personID, int sessionID, string attribute)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
@@ -117,7 +117,7 @@ class SqlitePersonSession : Sqlite
 
        //when a session is NOT KNOWN, then select atrribute of last session
        //select doubles
-       public static double SelectAttribute(int personID, string attribute)
+       public double SelectAttribute(int personID, string attribute)
        {
                Sqlite.Open();
 
@@ -140,7 +140,7 @@ class SqlitePersonSession : Sqlite
                return myReturn;
        }
        
-       public static void Update(PersonSession ps)
+       public void Update(PersonSession ps)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + Constants.PersonSessionTable + 
@@ -159,7 +159,7 @@ class SqlitePersonSession : Sqlite
        }
 
        //double
-       public static void UpdateAttribute(int personID, int sessionID, string attribute, double attrValue)
+       public void UpdateAttribute(int personID, int sessionID, string attribute, double attrValue)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + Constants.PersonSessionTable + 
@@ -172,7 +172,7 @@ class SqlitePersonSession : Sqlite
                Sqlite.Close();
        }
 
-       public static bool PersonSelectExistsInSession(int myPersonID, int mySessionID)
+       public bool PersonSelectExistsInSession(int myPersonID, int mySessionID)
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT * FROM " + Constants.PersonSessionTable +
@@ -200,11 +200,11 @@ class SqlitePersonSession : Sqlite
        //in a newly created person     
        //This is like SqlitePerson.Select but this returns a PersonSession
 
-       public static PersonSession Select(int personID, int sessionID)
+       public PersonSession Select(int personID, int sessionID)
        {
                return Select(false, personID, sessionID);
        }
-       public static PersonSession Select(bool dbconOpened, int personID, int sessionID)
+       public PersonSession Select(bool dbconOpened, int personID, int sessionID)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
@@ -250,7 +250,7 @@ class SqlitePersonSession : Sqlite
        //the difference between this select and others, is that this returns and ArrayList of Persons
        //this is better than return the strings that can produce bugs in the future
        //use this in the future:
-       public static ArrayList SelectCurrentSessionPersons(int sessionID, bool returnPersonAndPSlist) 
+       public ArrayList SelectCurrentSessionPersons(int sessionID, bool returnPersonAndPSlist) 
        {
                string tp = Constants.PersonTable;
                string tps = Constants.PersonSessionTable;
@@ -306,7 +306,7 @@ class SqlitePersonSession : Sqlite
        }
        
        
-       public static void DeletePersonFromSessionAndTests(string sessionID, string personID)
+       public void DeletePersonFromSessionAndTests(string sessionID, string personID)
        {
                Sqlite.Open();
 
@@ -417,7 +417,7 @@ class SqlitePersonSession : Sqlite
                Sqlite.Close();
        }
 
-       public static bool PersonExistsInPS(bool dbconOpened, int personID)
+       public bool PersonExistsInPS(bool dbconOpened, int personID)
        {
                if( ! dbconOpened)
                        Sqlite.Open();
diff --git a/src/sqlite/personSessionNotUpload.cs b/src/sqlite/personSessionNotUpload.cs
index ef438d9..6d097f6 100644
--- a/src/sqlite/personSessionNotUpload.cs
+++ b/src/sqlite/personSessionNotUpload.cs
@@ -26,7 +26,7 @@ using Mono.Data.Sqlite;
 
 class SqlitePersonSessionNotUpload : Sqlite
 {
-       protected internal static void CreateTable()
+       protected internal void CreateTable()
         {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.PersonNotUploadTable + " ( " +
@@ -44,7 +44,7 @@ class SqlitePersonSessionNotUpload : Sqlite
                dbcmd.ExecuteNonQuery();
         }
 
-       public static ArrayList SelectAll(int sessionID)
+       public ArrayList SelectAll(int sessionID)
         {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT personID FROM " + Constants.PersonNotUploadTable +
@@ -64,7 +64,7 @@ class SqlitePersonSessionNotUpload : Sqlite
                return myArray;
         }
 
-       public static void Add(int personID, int sessionID)
+       public void Add(int personID, int sessionID)
        {
                Sqlite.Open();
                dbcmd.CommandText = "INSERT INTO " + Constants.PersonNotUploadTable +  
@@ -76,7 +76,7 @@ class SqlitePersonSessionNotUpload : Sqlite
                Sqlite.Close();
         }
 
-       public static void Delete(int personID, int sessionID)
+       public void Delete(int personID, int sessionID)
         {
                 Sqlite.Open();
                 dbcmd.CommandText = "Delete FROM " + Constants.PersonNotUploadTable +
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index b909b64..827faa0 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -26,7 +26,7 @@ using Mono.Data.Sqlite;
 
 class SqlitePreferences : Sqlite
 {
-       protected internal static void createTable()
+       protected internal void createTable()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.PreferencesTable + " ( " +
@@ -35,7 +35,7 @@ class SqlitePreferences : Sqlite
                dbcmd.ExecuteNonQuery();
        }
        
-       protected internal static void initializeTable(string databaseVersion, bool creatingBlankDatabase)
+       protected internal void initializeTable(string databaseVersion, bool creatingBlankDatabase)
        {
                using(SqliteTransaction tr = dbcon.BeginTransaction())
                {
@@ -114,12 +114,12 @@ class SqlitePreferences : Sqlite
 
        //called from some Chronojump methods
        //adds dbcmd to be used on next Insert method
-       public static void Insert(string myName, string myValue)
+       public void Insert(string myName, string myValue)
        {
                Insert(myName, myValue, dbcmd);
        }
        //Called from initialize
-       public static void Insert(string myName, string myValue, SqliteCommand mycmd)
+       public void Insert(string myName, string myValue, SqliteCommand mycmd)
        {
                //Sqlite.Open();
                mycmd.CommandText = "INSERT INTO " + Constants.PreferencesTable + 
@@ -130,7 +130,7 @@ class SqlitePreferences : Sqlite
                //Sqlite.Close();
        }
 
-       public static void Update(string myName, string myValue, bool dbconOpened)
+       public void Update(string myName, string myValue, bool dbconOpened)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -146,12 +146,12 @@ class SqlitePreferences : Sqlite
        }
 
        //Called from most of all old Chronojump methods
-       public static string Select (string myName) 
+       public string Select (string myName) 
        {
                return Select(myName, false);
        }
        //Called from new methods were dbcon is opened
-       public static string Select (string myName, bool dbconOpened) 
+       public string Select (string myName, bool dbconOpened) 
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -178,7 +178,7 @@ class SqlitePreferences : Sqlite
                return myReturn;
        }
        
-       public static Preferences SelectAll () 
+       public Preferences SelectAll () 
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT * FROM " + Constants.PreferencesTable; 
diff --git a/src/sqlite/pulse.cs b/src/sqlite/pulse.cs
index 39b0c36..9a2366e 100644
--- a/src/sqlite/pulse.cs
+++ b/src/sqlite/pulse.cs
@@ -57,7 +57,7 @@ class SqlitePulse : Sqlite
         * Pulse class methods
         */
        
-       public static int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int 
sessionID, string type, double fixedPulse, int totalPulsesNum, string timeString, string description, int 
simulated)
+       public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID, 
string type, double fixedPulse, int totalPulsesNum, string timeString, string description, int simulated)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -87,7 +87,7 @@ class SqlitePulse : Sqlite
        
 
        //if all persons, put -1 in personID
-       public static string[] SelectPulses(bool dbconOpened, int sessionID, int personID) 
+       public string[] SelectPulses(bool dbconOpened, int sessionID, int personID) 
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -145,7 +145,7 @@ class SqlitePulse : Sqlite
                return myPulses;
        }
 
-       public static Pulse SelectPulseData(int uniqueID, bool dbconOpened)
+       public Pulse SelectPulseData(int uniqueID, bool dbconOpened)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -167,7 +167,7 @@ class SqlitePulse : Sqlite
                return myPulse;
        }
 
-       public static void Update(int pulseID, int personID, string description)
+       public void Update(int pulseID, int personID, string description)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + Constants.PulseTable + 
diff --git a/src/sqlite/pulseType.cs b/src/sqlite/pulseType.cs
index 627352f..f844136 100644
--- a/src/sqlite/pulseType.cs
+++ b/src/sqlite/pulseType.cs
@@ -33,7 +33,7 @@ class SqlitePulseType : Sqlite
        
        //creates table containing the types of simple Pulses
        //following INT values are booleans
-       protected internal static void createTablePulseType()
+       protected internal void createTablePulseType()
        {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.PulseTypeTable + " ( " +
@@ -46,7 +46,7 @@ class SqlitePulseType : Sqlite
        }
        
        //if this changes, pulseType.cs constructor should change 
-       protected internal static void initializeTablePulseType()
+       protected internal void initializeTablePulseType()
        {
                string [] iniPulseTypes = {
                        //name:fixedPulse:totalPulsesNum:description
@@ -62,7 +62,7 @@ class SqlitePulseType : Sqlite
         * PulseType class methods
         */
 
-       public static void Insert(string myPulse, bool dbconOpened)
+       public void Insert(string myPulse, bool dbconOpened)
        {
                string [] myStr = myPulse.Split(new char[] {':'});
                if(! dbconOpened) {
@@ -80,7 +80,7 @@ class SqlitePulseType : Sqlite
                }
        }
        
-       public static string[] SelectPulseTypes(string allPulsesName, bool onlyName) 
+       public string[] SelectPulseTypes(string allPulsesName, bool onlyName) 
        {
                //allPulsesName: add and "allPulsesName" value
                //onlyName: return only type name
@@ -137,7 +137,7 @@ class SqlitePulseType : Sqlite
                return myTypes;
        }
 
-       public static PulseType SelectAndReturnPulseType(string typeName) 
+       public PulseType SelectAndReturnPulseType(string typeName) 
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT * " +
diff --git a/src/sqlite/reactionTime.cs b/src/sqlite/reactionTime.cs
index 0484634..a9034b6 100644
--- a/src/sqlite/reactionTime.cs
+++ b/src/sqlite/reactionTime.cs
@@ -55,7 +55,7 @@ class SqliteReactionTime : Sqlite
         * ReactionTime class methods
         */
        
-       public static int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int 
sessionID, string type, double time, string description, int simulated)
+       public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID, 
string type, double time, string description, int simulated)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -85,7 +85,7 @@ class SqliteReactionTime : Sqlite
 
        //if all persons, put -1 in personID
        //if all types put, "" in filterType
-       public static string[] SelectReactionTimes(bool dbconOpened, int sessionID, int personID, string 
filterType,
+       public string[] SelectReactionTimes(bool dbconOpened, int sessionID, int personID, string filterType,
                        Orders_by order, int limit) 
        {
                if(!dbconOpened)
@@ -157,7 +157,7 @@ class SqliteReactionTime : Sqlite
                return myEvents;
        }
 
-       public static ReactionTime SelectReactionTimeData(int uniqueID, bool dbconOpened)
+       public ReactionTime SelectReactionTimeData(int uniqueID, bool dbconOpened)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -180,7 +180,7 @@ class SqliteReactionTime : Sqlite
                return myRT;
        }
                
-       public static void Update(int eventID, string type, string time, int personID, string description)
+       public void Update(int eventID, string type, string time, int personID, string description)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + Constants.ReactionTimeTable + " SET personID = " + personID + 
diff --git a/src/sqlite/run.cs b/src/sqlite/run.cs
index fa704cc..79bae90 100644
--- a/src/sqlite/run.cs
+++ b/src/sqlite/run.cs
@@ -57,7 +57,7 @@ class SqliteRun : Sqlite
         * Run class methods
         */
        
-       public static int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int 
sessionID, string type, double distance, double time, string description, int simulated, bool initialSpeed)
+       public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID, 
string type, double distance, double time, string description, int simulated, bool initialSpeed)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -90,7 +90,7 @@ class SqliteRun : Sqlite
        //if all persons, put -1 in personID
        //if all types, put "" in filterType
        //unlimited put -1 in limit
-       public static string[] SelectRuns(bool dbconOpened, int sessionID, int personID, string filterType,
+       public string[] SelectRuns(bool dbconOpened, int sessionID, int personID, string filterType,
                        Orders_by order, int limit) 
        {
                if(!dbconOpened)
@@ -168,7 +168,7 @@ class SqliteRun : Sqlite
                return myRuns;
        }
 
-       public static Run SelectRunData(int uniqueID, bool dbconOpened)
+       public Run SelectRunData(int uniqueID, bool dbconOpened)
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -191,7 +191,7 @@ class SqliteRun : Sqlite
                return myRun;
        }
                
-       public static string [] SelectTestMaxStuff(int personID, RunType runType) 
+       public string [] SelectTestMaxStuff(int personID, RunType runType) 
        {
                Sqlite.Open();
                
@@ -214,7 +214,7 @@ class SqliteRun : Sqlite
                return str;
        }
        
-       public static void Update(int runID, string type, string distance, string time, int personID, string 
description)
+       public void Update(int runID, string type, string distance, string time, int personID, string 
description)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + Constants.RunTable + 
diff --git a/src/sqlite/runInterval.cs b/src/sqlite/runInterval.cs
index a2dda81..6b1dbfb 100644
--- a/src/sqlite/runInterval.cs
+++ b/src/sqlite/runInterval.cs
@@ -54,7 +54,7 @@ class SqliteRunInterval : SqliteRun
                dbcmd.ExecuteNonQuery();
        }
 
-       public static int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int 
sessionID, string type, double distanceTotal, double timeTotal, double distanceInterval, string 
intervalTimesString, double tracks, string description, string limited, int simulated, bool initialSpeed )
+       public int Insert(bool dbconOpened, string tableName, string uniqueID, int personID, int sessionID, 
string type, double distanceTotal, double timeTotal, double distanceInterval, string intervalTimesString, 
double tracks, string description, string limited, int simulated, bool initialSpeed )
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -89,7 +89,7 @@ class SqliteRunInterval : SqliteRun
                return myLast;
        }
 
-       public new static string[] SelectRuns(bool dbconOpened, int sessionID, int personID, string 
filterType) 
+       public new string[] SelectRuns(bool dbconOpened, int sessionID, int personID, string filterType) 
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -160,7 +160,7 @@ class SqliteRunInterval : SqliteRun
                return myRuns;
        }
 
-       public static RunInterval SelectRunData(string tableName, int uniqueID, bool dbconOpened)
+       public RunInterval SelectRunData(string tableName, int uniqueID, bool dbconOpened)
        {
                //tableName can be runInterval or tempRunInterval
 
@@ -184,7 +184,7 @@ class SqliteRunInterval : SqliteRun
                return myRun;
        }
 
-       public static void Update(int runID, int personID, string description)
+       public void Update(int runID, int personID, string description)
        {
                Sqlite.Open();
                dbcmd.CommandText = "UPDATE " + Constants.RunIntervalTable +
diff --git a/src/sqlite/runType.cs b/src/sqlite/runType.cs
index 53a7984..d91588c 100644
--- a/src/sqlite/runType.cs
+++ b/src/sqlite/runType.cs
@@ -38,8 +38,8 @@ class SqliteRunType : Sqlite
        
        //creates table containing the types of simple Runs
        //following INT values are booleans
-       //protected internal static void createTableRunType()
-       //protected internal static void createTable(string tableName)
+       //protected internal void createTableRunType()
+       //protected internal void createTable(string tableName)
        protected override void createTable(string tableName)
        {
                dbcmd.CommandText = 
@@ -53,8 +53,8 @@ class SqliteRunType : Sqlite
        }
        
        //if this changes, runType.cs constructor should change 
-       //protected internal static void initializeTableRunType()
-       protected internal static void initializeTable()
+       //protected internal void initializeTableRunType()
+       protected internal void initializeTable()
        {
                string [] iniRunTypes = {
                        //name:distance:description
@@ -109,12 +109,12 @@ class SqliteRunType : Sqlite
 
        //called from some Chronojump methods
        //adds dbcmd to be used on next Insert method
-       public static int Insert(RunType t, string tableName, bool dbconOpened)
+       public int Insert(RunType t, string tableName, bool dbconOpened)
        {
                return Insert(t, tableName, dbconOpened, dbcmd);
        }
        //Called from initialize
-       public static int Insert(RunType t, string tableName, bool dbconOpened, SqliteCommand mycmd)
+       public int Insert(RunType t, string tableName, bool dbconOpened, SqliteCommand mycmd)
        {
                //string [] myStr = myRun.Split(new char[] {':'});
                if(! dbconOpened) {
@@ -143,7 +143,7 @@ class SqliteRunType : Sqlite
                return myLast;
        }
        
-       public static RunType SelectAndReturnRunType(string typeName, bool dbconOpened) 
+       public RunType SelectAndReturnRunType(string typeName, bool dbconOpened) 
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -175,7 +175,7 @@ class SqliteRunType : Sqlite
                return myRunType;
        }
 
-       public static string[] SelectRunTypes(string allRunsName, bool onlyName) 
+       public string[] SelectRunTypes(string allRunsName, bool onlyName) 
        {
                //allRunsName: add and "allRunsName" value
                //onlyName: return only type name
@@ -234,7 +234,7 @@ class SqliteRunType : Sqlite
                return myTypes;
        }
 
-       public static double Distance (string typeName) 
+       public double Distance (string typeName) 
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT distance " +
@@ -256,7 +256,7 @@ class SqliteRunType : Sqlite
                return distance;
        }
        
-       public static void AddGraphLinksRunSimple() {
+       public void AddGraphLinksRunSimple() {
                using(SqliteTransaction tr = dbcon.BeginTransaction())
                {
                        using (SqliteCommand dbcmdTr = dbcon.CreateCommand())
@@ -274,7 +274,7 @@ class SqliteRunType : Sqlite
                }
        }
 
-       public static void AddGraphLinksRunSimpleAgility() {
+       public void AddGraphLinksRunSimpleAgility() {
                using(SqliteTransaction tr = dbcon.BeginTransaction())
                {
                        using (SqliteCommand dbcmdTr = dbcon.CreateCommand())
@@ -294,7 +294,7 @@ class SqliteRunType : Sqlite
        }
 
 
-       public static void Delete(string name)
+       public void Delete(string name)
        {
                Sqlite.Open();
                dbcmd.CommandText = "Delete FROM " + Constants.RunTypeTable +
@@ -316,8 +316,8 @@ class SqliteRunIntervalType : SqliteRunType
        
        //creates table containing the types of Interval Runs 
        //following INT values are booleans
-       //protected internal static void createTableRunIntervalType()
-       //protected internal static void createTable(string tableName)
+       //protected internal void createTableRunIntervalType()
+       //protected internal void createTable(string tableName)
        protected override void createTable(string tableName)
        {
                dbcmd.CommandText = 
@@ -341,8 +341,8 @@ class SqliteRunIntervalType : SqliteRunType
        }
        
        //if this changes, runType.cs constructor should change 
-       //protected internal static void initializeTableRunIntervalType()
-       protected internal static new void initializeTable()
+       //protected internal void initializeTableRunIntervalType()
+       protected internal new void initializeTable()
        {
                string [] iniRunTypes = {
                        //name:distance:tracksLimited:fixedValue:unlimited:description:distancesString
@@ -384,7 +384,7 @@ class SqliteRunIntervalType : SqliteRunType
                addRSA();
        }
 
-       protected internal static void addRSA()
+       protected internal void addRSA()
        {
                string [] iniRunTypes = {
                        //name:distance:tracksLimited:fixedValue:unlimited:description:distancesString
@@ -428,12 +428,12 @@ class SqliteRunIntervalType : SqliteRunType
 
        //called from some Chronojump methods
        //adds dbcmd to be used on next Insert method
-       public static new int Insert(RunType t, string tableName, bool dbconOpened)
+       public new int Insert(RunType t, string tableName, bool dbconOpened)
        {
                return Insert(t, tableName, dbconOpened, dbcmd);
        }
        //Called from initialize
-       public static new int Insert(RunType t, string tableName, bool dbconOpened, SqliteCommand mycmd)
+       public new int Insert(RunType t, string tableName, bool dbconOpened, SqliteCommand mycmd)
        {
                //done here for not having twho Sqlite.Opened
                //double distance = t.Distance;
@@ -461,7 +461,7 @@ class SqliteRunIntervalType : SqliteRunType
                return myLast;
        }
 
-       public static string[] SelectRunIntervalTypes(string allRunsName, bool onlyName) 
+       public string[] SelectRunIntervalTypes(string allRunsName, bool onlyName) 
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT * " +
@@ -516,7 +516,7 @@ class SqliteRunIntervalType : SqliteRunType
                return myTypes;
        }
 
-       public static RunType SelectAndReturnRunIntervalType(string typeName, bool dbconOpened) 
+       public RunType SelectAndReturnRunIntervalType(string typeName, bool dbconOpened) 
        {
                if(!dbconOpened)
                        Sqlite.Open();
@@ -557,7 +557,7 @@ class SqliteRunIntervalType : SqliteRunType
                return myRunType;
        }
 
-       public static void AddGraphLinksRunInterval() {
+       public void AddGraphLinksRunInterval() {
                using(SqliteTransaction tr = dbcon.BeginTransaction())
                {
                        using (SqliteCommand dbcmdTr = dbcon.CreateCommand())
@@ -577,7 +577,7 @@ class SqliteRunIntervalType : SqliteRunType
                }
        }
        
-       public static void Delete(string name)
+       public void Delete(string name)
        {
                Sqlite.Open();
                dbcmd.CommandText = "Delete FROM " + Constants.RunIntervalTypeTable +
diff --git a/src/sqlite/server.cs b/src/sqlite/server.cs
index 744d984..810bcef 100644
--- a/src/sqlite/server.cs
+++ b/src/sqlite/server.cs
@@ -63,8 +63,8 @@ class SqliteServer : Sqlite
                dbcmd.ExecuteNonQuery();
         }
 
-       //public static int InsertPing(ServerPing ping)
-       public static int InsertPing(bool dbconOpened, int evaluatorID, string cjVersion, string osVersion, 
string ip, DateTime date)
+       //public int InsertPing(ServerPing ping)
+       public int InsertPing(bool dbconOpened, int evaluatorID, string cjVersion, string osVersion, string 
ip, DateTime date)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -95,7 +95,7 @@ class SqliteServer : Sqlite
                return myLast;
        }
 
-       public static int InsertEvaluator(bool dbconOpened, string code, string name, string email, DateTime 
dateBorn, 
+       public int InsertEvaluator(bool dbconOpened, string code, string name, string email, DateTime 
dateBorn, 
                        int countryID, string chronometer, string device, string comments, bool confiable)
        {
                if(! dbconOpened)
@@ -133,7 +133,7 @@ class SqliteServer : Sqlite
                return myLast;
        }
        
-       public static void UpdateEvaluator(bool dbconOpened, int uniqueID, string code, string name, string 
email, DateTime dateBorn, 
+       public void UpdateEvaluator(bool dbconOpened, int uniqueID, string code, string name, string email, 
DateTime dateBorn, 
                        int countryID, string chronometer, string device, string comments, bool confiable)
        {
                if(! dbconOpened)
@@ -159,7 +159,7 @@ class SqliteServer : Sqlite
        
        //when client selects in it's DB, there's only a row with uniqueID: 1
        //if confiable is read on client, it will be also checked on server
-       public static ServerEvaluator SelectEvaluator(int myUniqueID)
+       public ServerEvaluator SelectEvaluator(int myUniqueID)
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT * FROM " + Constants.ServerEvaluatorTable + " WHERE uniqueID == " 
+ myUniqueID ; 
@@ -191,7 +191,7 @@ class SqliteServer : Sqlite
                return myEval;
        }
        
-       public static string [] SelectEvaluators(bool addAnyString)
+       public string [] SelectEvaluators(bool addAnyString)
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT " + 
@@ -216,7 +216,7 @@ class SqliteServer : Sqlite
                return Util.ArrayListToString(evals);
        }
        
-       public static string Query(string str) {
+       public string Query(string str) {
                Sqlite.Open();
 
                dbcmd.CommandText = str; 
@@ -235,7 +235,7 @@ class SqliteServer : Sqlite
                return myReturn;
        }
 
-       public static string [] Stats() {
+       public string [] Stats() {
                ArrayList stats = new ArrayList();
                        
                Sqlite.Open();
@@ -267,7 +267,7 @@ class SqliteServer : Sqlite
        /*
         * this is only called on client
         */
-       public static string [] StatsMine() {
+       public string [] StatsMine() {
                ArrayList stats = new ArrayList();
                        
                Sqlite.Open();
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index 85bf7f8..9afbc84 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -35,7 +35,7 @@ class SqliteSession : Sqlite
 
        //can be "Constants.SessionTable" or "Constants.ConvertTempTable"
        //temp is used to modify table between different database versions if needed
-       //protected new internal static void createTable(string tableName)
+       //protected new internal void createTable(string tableName)
        protected override void createTable(string tableName)
        {
                dbcmd.CommandText = 
@@ -53,7 +53,7 @@ class SqliteSession : Sqlite
                dbcmd.ExecuteNonQuery();
        }
        
-       public static int Insert(bool dbconOpened, string tableName, string uniqueID, string name, string 
place, DateTime date, int personsSportID, int personsSpeciallityID, int personsPractice, string comments, int 
serverUniqueID)
+       public int Insert(bool dbconOpened, string tableName, string uniqueID, string name, string place, 
DateTime date, int personsSportID, int personsSpeciallityID, int personsPractice, string comments, int 
serverUniqueID)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -82,7 +82,7 @@ class SqliteSession : Sqlite
                return myLast;
        }
 
-       protected internal static void insertSimulatedSession()
+       protected internal void insertSimulatedSession()
        {
                if(! Sqlite.Exists (true, Constants.SessionTable, Constants.SessionSimulatedName))
                        Insert(true, Constants.SessionTable, "-1", Constants.SessionSimulatedName, "", 
DateTime.Today, 
@@ -90,7 +90,7 @@ class SqliteSession : Sqlite
                                        Catalog.GetString("Use this session to simulate tests."), 
Constants.ServerUndefinedID);
        }
 
-       public static void Update(int uniqueID, string name, string place, DateTime date, int personsSportID, 
int personsSpeciallityID, int personsPractice, string comments) 
+       public void Update(int uniqueID, string name, string place, DateTime date, int personsSportID, int 
personsSpeciallityID, int personsPractice, string comments) 
        {
                //TODO: serverUniqueID (but cannot be changed in gui/edit, then not need now)
                Sqlite.Open();
@@ -108,7 +108,7 @@ class SqliteSession : Sqlite
        }
        
        //updating local session when it gets uploaded
-       public static void UpdateServerUniqueID(int uniqueID, int serverID)
+       public void UpdateServerUniqueID(int uniqueID, int serverID)
        {
                //if(!dbconOpened)
                        Sqlite.Open();
@@ -125,18 +125,18 @@ class SqliteSession : Sqlite
 
        //by name (only in gui/networks.cs configInit
        //be careful because name is not unique
-       public static Session SelectByName(string name)
+       public Session SelectByName(string name)
        {
                dbcmd.CommandText = "SELECT * FROM " + Constants.SessionTable + " WHERE name == \"" + name + 
"\""; 
                return SelectDo(dbcmd);
        }
        //by ID (default
-       public static Session Select(string myUniqueID)
+       public Session Select(string myUniqueID)
        {
                dbcmd.CommandText = "SELECT * FROM " + Constants.SessionTable + " WHERE uniqueID == " + 
myUniqueID ; 
                return SelectDo(dbcmd);
        }
-       public static Session SelectDo(SqliteCommand mydbcmd)
+       public Session SelectDo(SqliteCommand mydbcmd)
        {
                try {
                        Sqlite.Open();
@@ -178,7 +178,7 @@ class SqliteSession : Sqlite
        
        //used by the stats selector of sessions
        //also by PersonsRecuperateFromOtherSessionWindowBox (src/gui/person.cs)
-       public static string[] SelectAllSessionsSimple(bool commentsDisable, int sessionIdDisable) 
+       public string[] SelectAllSessionsSimple(bool commentsDisable, int sessionIdDisable) 
        {
                string selectString = " uniqueID, name, place, date, comments ";
                if(commentsDisable) {
@@ -227,7 +227,7 @@ class SqliteSession : Sqlite
        }
 
 
-       public static string[] SelectAllSessions(string filterName) 
+       public string[] SelectAllSessions(string filterName) 
        {
                Sqlite.Open();
 
@@ -603,19 +603,19 @@ class SqliteSession : Sqlite
 
        //called from gui/event.cs for doing the graph
        //we need to know the avg of events of a type (SJ, CMJ, free (pulse).. of a person, or of all persons 
on the session
-       public static double SelectAVGEventsOfAType(bool dbconOpened, int sessionID, int personID, string 
table, string type, string valueToSelect) 
+       public double SelectAVGEventsOfAType(bool dbconOpened, int sessionID, int personID, string table, 
string type, string valueToSelect) 
        {
                return selectEventsOfAType(dbconOpened, sessionID, personID, table, type, valueToSelect, 
"AVG");
        }
-       public static double SelectMAXEventsOfAType(bool dbconOpened, int sessionID, int personID, string 
table, string type, string valueToSelect) 
+       public double SelectMAXEventsOfAType(bool dbconOpened, int sessionID, int personID, string table, 
string type, string valueToSelect) 
        {
                return selectEventsOfAType(dbconOpened, sessionID, personID, table, type, valueToSelect, 
"MAX");
        }
-       public static double SelectMINEventsOfAType(bool dbconOpened, int sessionID, int personID, string 
table, string type, string valueToSelect) 
+       public double SelectMINEventsOfAType(bool dbconOpened, int sessionID, int personID, string table, 
string type, string valueToSelect) 
        {
                return selectEventsOfAType(dbconOpened, sessionID, personID, table, type, valueToSelect, 
"MIN");
        }
-       public static double selectEventsOfAType(bool dbconOpened, int sessionID, int personID, 
+       public double selectEventsOfAType(bool dbconOpened, int sessionID, int personID, 
                        string table, string type, string valueToSelect, string statistic) 
        {
                if(!dbconOpened)
@@ -662,7 +662,7 @@ class SqliteSession : Sqlite
        }
 
        
-       public static void DeleteAllStuff(string uniqueID)
+       public void DeleteAllStuff(string uniqueID)
        {
                Sqlite.Open();
 
@@ -773,7 +773,7 @@ class SqliteServerSession : SqliteSession
                dbcmd.ExecuteNonQuery();
        }
        
-       public static int Insert(bool dbconOpened, string tableName, string name, string place, DateTime 
date, int personsSportID, int personsSpeciallityID, int personsPractice, string comments, int serverUniqueID, 
int evaluatorID, string evaluatorCJVersion, string evaluatorOS, DateTime uploadedDate, int uploadingState)
+       public int Insert(bool dbconOpened, string tableName, string name, string place, DateTime date, int 
personsSportID, int personsSpeciallityID, int personsPractice, string comments, int serverUniqueID, int 
evaluatorID, string evaluatorCJVersion, string evaluatorOS, DateTime uploadedDate, int uploadingState)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -807,7 +807,7 @@ class SqliteServerSession : SqliteSession
        }
        
        //updating local session when it gets uploaded
-       public static void UpdateUploadingState(int uniqueID, int state)
+       public void UpdateUploadingState(int uniqueID, int state)
        {
                //if(!dbconOpened)
                        Sqlite.Open();
diff --git a/src/sqlite/speciallity.cs b/src/sqlite/speciallity.cs
index f2c9b78..db349f5 100644
--- a/src/sqlite/speciallity.cs
+++ b/src/sqlite/speciallity.cs
@@ -30,7 +30,7 @@ using Mono.Unix;
 
 class SqliteSpeciallity : Sqlite
 {
-       protected internal static void createTable()
+       protected internal void createTable()
         {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.SpeciallityTable + " ( " +
@@ -41,7 +41,7 @@ class SqliteSpeciallity : Sqlite
         }
 
        // intialize sport table
-       protected internal static void initialize()
+       protected internal void initialize()
        {
                conversionSubRateTotal = Speciallities.Length;
                conversionSubRate = 0;
@@ -65,7 +65,7 @@ class SqliteSpeciallity : Sqlite
                }
        }
 
-       public static int Insert(bool dbconOpened, SqliteCommand mycmd, int sportID, string speciallityName)
+       public int Insert(bool dbconOpened, SqliteCommand mycmd, int sportID, string speciallityName)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -89,7 +89,7 @@ class SqliteSpeciallity : Sqlite
                return myLast;
        }
 
-       public static string Select(bool dbconOpened, int uniqueID)
+       public string Select(bool dbconOpened, int uniqueID)
        {
                if(uniqueID == -1)
                        return "";
@@ -116,7 +116,7 @@ class SqliteSpeciallity : Sqlite
                return Catalog.GetString(speciallityName);
        }
        
-       public static string [] SelectAll(bool showUndefined, int sportFilter) 
+       public string [] SelectAll(bool showUndefined, int sportFilter) 
        {
                string whereString = "";
                if(sportFilter != -1)
@@ -160,7 +160,7 @@ class SqliteSpeciallity : Sqlite
        //string will be shown in user language
        //speciallities use sport names and not ids, because in the future if sports grow it can be messed 
with user sports
        //when it's not defined it will be -1
-       private static string [] Speciallities = {
+       private string [] Speciallities = {
                //"-1:" + Constants.SpeciallityUndefined + ":" + 
Catalog.GetString(Constants.SpeciallityUndefined), 
                
                "Aquatics:" + "Diving" + ":" + Catalog.GetString("Diving"), 
@@ -213,7 +213,7 @@ class SqliteSpeciallity : Sqlite
        };
 
        //convert from DB 0.54 to 0.55
-       public static void InsertUndefined(bool dbconOpened)
+       public void InsertUndefined(bool dbconOpened)
        {
                if(! dbconOpened)
                        Sqlite.Open();
diff --git a/src/sqlite/sport.cs b/src/sqlite/sport.cs
index 7c134ac..f459ca9 100644
--- a/src/sqlite/sport.cs
+++ b/src/sqlite/sport.cs
@@ -29,7 +29,7 @@ using Mono.Unix;
 
 class SqliteSport : Sqlite
 {
-       protected internal static void createTable()
+       protected internal void createTable()
         {
                dbcmd.CommandText = 
                        "CREATE TABLE " + Constants.SportTable + " ( " +
@@ -42,7 +42,7 @@ class SqliteSport : Sqlite
         }
 
        // intialize sport table
-       protected internal static void initialize()
+       protected internal void initialize()
        {
                conversionSubRateTotal = sportsChronojump.Length;
                conversionSubRate = 0;
@@ -68,13 +68,13 @@ class SqliteSport : Sqlite
 
        //called from some Chronojump methods
        //adds dbcmd to be used on next Insert method
-       public static int Insert(bool dbconOpened, string uniqueID, string name, bool userDefined, bool 
hasSpeciallities, string graphLink)
+       public int Insert(bool dbconOpened, string uniqueID, string name, bool userDefined, bool 
hasSpeciallities, string graphLink)
        {
                return Insert(dbconOpened, dbcmd, uniqueID, name, userDefined, hasSpeciallities, graphLink);
 
        }
        //Called from initialize
-       public static int Insert(bool dbconOpened, SqliteCommand mycmd, string uniqueID, string name, bool 
userDefined, bool hasSpeciallities, string graphLink)
+       public int Insert(bool dbconOpened, SqliteCommand mycmd, string uniqueID, string name, bool 
userDefined, bool hasSpeciallities, string graphLink)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -103,7 +103,7 @@ class SqliteSport : Sqlite
                return myLast;
        }
 
-       public static Sport Select(bool dbconOpened, int uniqueID)
+       public Sport Select(bool dbconOpened, int uniqueID)
        {
                if(! dbconOpened)
                        Sqlite.Open();
@@ -133,7 +133,7 @@ class SqliteSport : Sqlite
                return mySport;
        }
                
-       public static int SelectID(string name)
+       public int SelectID(string name)
        {
                //Sqlite.Open();
                
@@ -153,7 +153,7 @@ class SqliteSport : Sqlite
                return myID;
        }
 
-       public static string [] SelectAll() 
+       public string [] SelectAll() 
        {
                Sqlite.Open();
                SqliteDataReader reader;
@@ -196,7 +196,7 @@ class SqliteSport : Sqlite
         * all this are obviously NOT user defined
         * last string is for graphLink
         */
-       private static string [] sportsChronojump = {
+       private string [] sportsChronojump = {
                //true or false means if it has speciallities
                Constants.SportUndefined + ":" + Catalog.GetString(Constants.SportUndefined) + ":" + false + 
":" + "", //will be 1 (it's also written in Constants.SportUndefinedID
                Constants.SportNone + ":" + Catalog.GetString(Constants.SportNone) + ":" + false + ":" + "",  
   //will be 2 (it's also written in Constants.SportNoneID
diff --git a/src/sqlite/stat.cs b/src/sqlite/stat.cs
index 5f201bb..b34ff24 100644
--- a/src/sqlite/stat.cs
+++ b/src/sqlite/stat.cs
@@ -30,7 +30,7 @@ class SqliteStat : Sqlite
 {
        //sj, cmj, abk (no sj+)
        //AllJumpsName (simple) is not managed here, is done in SjCmjAbkPlus
-       public static ArrayList SjCmjAbk (string sessionString, bool multisession, string operationString, 
string jumpType, bool showSex, bool heightPreferred)
+       public ArrayList SjCmjAbk (string sessionString, bool multisession, string operationString, string 
jumpType, bool showSex, bool heightPreferred)
        {
                string tp = Constants.PersonTable;
 
@@ -113,7 +113,7 @@ class SqliteStat : Sqlite
        
        //sj+, cmj+, abk+
        //and AllJumpsName (simple)
-       public static ArrayList SjCmjAbkPlus (string sessionString, bool multisession, string 
operationString, string jumpType, bool showSex, bool heightPreferred, bool weightPercentPreferred)
+       public ArrayList SjCmjAbkPlus (string sessionString, bool multisession, string operationString, 
string jumpType, bool showSex, bool heightPreferred, bool weightPercentPreferred)
        {
                string tp = Constants.PersonTable;
                string tps = Constants.PersonSessionTable;
@@ -217,7 +217,7 @@ class SqliteStat : Sqlite
                return myArray;
        }
 
-       private static string convertWeight (string jumpW, double personW, bool percentDesired) {
+       private string convertWeight (string jumpW, double personW, bool percentDesired) {
                //if it was a non weight jump, return 0
                if(jumpW.Length == 0) {
                        return "0";
@@ -255,7 +255,7 @@ class SqliteStat : Sqlite
        }
 
        //dj index, Q index, Dj Power ( ... (indexType)
-       public static ArrayList DjIndexes (string indexType, string sessionString, bool multisession, string 
operationString, string jumpType, bool showSex)
+       public ArrayList DjIndexes (string indexType, string sessionString, bool multisession, string 
operationString, string jumpType, bool showSex)
        {
                string tp = Constants.PersonTable;
 
@@ -382,7 +382,7 @@ class SqliteStat : Sqlite
                return myArray;
        }
 
-       public static ArrayList RjIndex (string sessionString, bool multisession, string operationString, 
string jumpType, bool showSex)
+       public ArrayList RjIndex (string sessionString, bool multisession, string operationString, string 
jumpType, bool showSex)
        {
                string tp = Constants.PersonTable;
 
@@ -477,7 +477,7 @@ class SqliteStat : Sqlite
                return myArray;
        }
 
-       public static ArrayList RjPotencyBosco (string sessionString, bool multisession, string 
operationString, string jumpType, bool showSex)
+       public ArrayList RjPotencyBosco (string sessionString, bool multisession, string operationString, 
string jumpType, bool showSex)
        {
                string tp = Constants.PersonTable;
 
@@ -581,7 +581,7 @@ class SqliteStat : Sqlite
 
 
        //for rjEvolution (to know the number of columns)
-       public static int ObtainMaxNumberOfJumps (string sessionString)
+       public int ObtainMaxNumberOfJumps (string sessionString)
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT MAX(jumps) from jumpRj " + sessionString +
@@ -610,7 +610,7 @@ class SqliteStat : Sqlite
        }
        
        //for start/RunIntervallic (to know the number of columns)
-       public static int ObtainMaxNumberOfRuns (string sessionString)
+       public int ObtainMaxNumberOfRuns (string sessionString)
        {
                Sqlite.Open();
                dbcmd.CommandText = "SELECT MAX(tracks) from runInterval " + sessionString +
@@ -642,7 +642,7 @@ class SqliteStat : Sqlite
 
        //convert the strings of TFs and TCs separated by '=' in
        //one string mixed and separated by ':' (starting by an ':')
-       private static string combineTCsTFs(string TCs, string TFs, int maxJumps)
+       private string combineTCsTFs(string TCs, string TFs, int maxJumps)
        {
                string [] TCFull = TCs.Split(new char[] {'='});
                string [] TFFull = TFs.Split(new char[] {'='});
@@ -665,7 +665,7 @@ class SqliteStat : Sqlite
        //maxJumps for make all the results of same length (fill it with '-'s)
        //rjAVGSD also calls this method
        //but both of them are simple session
-       public static ArrayList RjEvolution (string sessionString, bool multisession, string operationString, 
string jumpType, bool showSex, int maxJumps)
+       public ArrayList RjEvolution (string sessionString, bool multisession, string operationString, string 
jumpType, bool showSex, int maxJumps)
        {
                string tp = Constants.PersonTable;
 
@@ -771,7 +771,7 @@ class SqliteStat : Sqlite
 
        //maxRuns for make all the results of same length (fill it with '-'s)
        //only simple session
-       public static ArrayList RunInterval (string sessionString, bool multisession, string operationString, 
string runType, bool showSex, int maxRuns)
+       public ArrayList RunInterval (string sessionString, bool multisession, string operationString, string 
runType, bool showSex, int maxRuns)
        {
                string tp = Constants.PersonTable;
 
@@ -871,7 +871,7 @@ LogB.SQL(intervalSpeeds);
        }
 
        //1.4.7 useHeights is the new default, because this indexes should use height instead of TV that has 
been used by default since now
-       public static ArrayList JumpIndexes (string sessionString, bool multisession, string ini, string end, 
string jump1, string jump2, bool showSex, bool useHeights)
+       public ArrayList JumpIndexes (string sessionString, bool multisession, string ini, string end, string 
jump1, string jump2, bool showSex, bool useHeights)
        {
                string tp = Constants.PersonTable;
 
@@ -954,7 +954,7 @@ LogB.SQL(intervalSpeeds);
        }
        
        //is the same as IE, Arms Use Index except the moreSelect lines
-       public static ArrayList JumpSimpleSubtraction (string sessionString, bool multisession, string ini, 
string end, string jump1, string jump2, bool showSex)
+       public ArrayList JumpSimpleSubtraction (string sessionString, bool multisession, string ini, string 
end, string jump1, string jump2, bool showSex)
        {
                string tp = Constants.PersonTable;
                string orderByString = "ORDER BY ";
@@ -1032,7 +1032,7 @@ LogB.SQL(intervalSpeeds);
        }
 
 
-       public static ArrayList Fv (string sessionString, bool multisession, string ini, string end, string 
jump1, string jump2, bool showSex)
+       public ArrayList Fv (string sessionString, bool multisession, string ini, string end, string jump1, 
string jump2, bool showSex)
        {
                string tp = Constants.PersonTable;
 
@@ -1115,7 +1115,7 @@ LogB.SQL(intervalSpeeds);
                return myArray;
        }
 
-       public static ArrayList Potency (string indexType, string sessionString, bool multisession, string 
operationString, string jumpType, bool showSex, bool heightPreferred)
+       public ArrayList Potency (string indexType, string sessionString, bool multisession, string 
operationString, string jumpType, bool showSex, bool heightPreferred)
        {
                string tp = Constants.PersonTable;
                string tps = Constants.PersonSessionTable;
@@ -1290,7 +1290,7 @@ LogB.SQL(intervalSpeeds);
                return myArray;
        }
 
-       public static ArrayList RunSimple (string sessionString, bool multisession, string operationString, 
string runType, bool showSex)
+       public ArrayList RunSimple (string sessionString, bool multisession, string operationString, string 
runType, bool showSex)
        {
                string tp = Constants.PersonTable;
 
@@ -1383,7 +1383,7 @@ LogB.SQL(intervalSpeeds);
         * Note criteria of indexes has changed see method above
         */
        /*
-       public static ArrayList SelectChronojumpProfile (string sessionID)
+       public ArrayList SelectChronojumpProfile (string sessionID)
        {
                Sqlite.Open();
                


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