예제 #1
0
    public StatFv(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;           //for simplesession (FV, cmj, sj)
        this.indexType   = indexType;   // "FV"

        jump1 = "SJl";
        jump2 = "SJ";

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper, FV, cmj, sj
        }

        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = indexType;
        columnsString[2] = jump1 + " (" + Catalog.GetString("height") + ")";
        columnsString[3] = jump2 + " (" + Catalog.GetString("height") + ")";

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #2
0
    public StatRjAVGSD(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.indexType = indexType;

        this.dataColumns = 3;

        /*
         * only simplesession, because it has to plot two values: AVG, and SD
         * if(sessions.Count > 1) {
         *      store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
         * } else {
         */
        store = getStore(dataColumns + 1);                //jumper, AVG, SD, jumps
        //}

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #3
0
    public StatSjCmjAbkPlus(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3;	//for simplesession (height, tv, weight)

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper, height, TF, weight (this col has characters '%' and 'Kg') solved in sqlite
        }

        weightPercentPreferred = myStatTypeStruct.preferences.weightStatsPercent;
        string weightName = Catalog.GetString("Extra weight");
        if(weightPercentPreferred)
            weightName += " %";
        else
            weightName += " Kg";

        string [] columnsString = { Catalog.GetString("Jumper"), Catalog.GetString("Height"),
            Catalog.GetString("TF"), weightName };
        /*
        if(! percent) {
            columnsString[3] = Catalog.GetString("Weight Kg");
        }
        */

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #4
0
    public StatRunSimple(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;           //for simplesession (speed, distance, time)

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper, speed, distance, time
        }

        string [] columnsString = { Catalog.GetString("Run"),      Catalog.GetString("Speed"),
                                    Catalog.GetString("Distance"), Catalog.GetString("Time") };

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #5
0
    public StatJumpSimpleSubtraction(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 4;	//for simplesession (result %, result, test1, test2)

        string [] applyTos = myStatTypeStruct.StatisticApplyTo.Split(new char[] {','});
        test1 = applyTos[0];
        test2 = applyTos[1];

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper, result %, result, test1, test2
        }

        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = Catalog.GetString("Result") + " %";
        columnsString[2] = Catalog.GetString("Result");
        columnsString[3] = test1;
        columnsString[4] = test2;

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #6
0
    public StatPotency(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        this.indexType = indexType;

        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 4;	//for simplesession (potency, personweightinkg, extraweightink, height)

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper + dataColumns (weight cols have characters '%' and 'Kg') solved in sqlite
        }

        string [] columnsString = { Catalog.GetString("Jumper"),
            Catalog.GetString("Peak Power"),
            Catalog.GetString("Person's Weight"),
            Catalog.GetString("Extra Weight") + " (Kg)",
            Catalog.GetString("Height") };
        /*
        if(! percent) {
            columnsString[3] = Catalog.GetString("Weight Kg");
        }
        */

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #7
0
    public StatDjPower(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 6;           //for simplesession (index, height, tv, tc, fall, weight)

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper, index, height, tv, tc, fall, weight
        }

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #8
0
    //comes from gui/stats.cs
    public StatType(string statisticType, string statisticSubType, string statisticApplyTo, Gtk.TreeView treeview_stats,
                    ArrayList sendSelectedSessions, bool sex_active, int statsJumpsType, int limit,
                    ArrayList markedRows, int evolution_mark_consecutives, GraphROptions gRO,
                    bool graph, bool toReport, Preferences preferences)
    {
        //some of this will disappear when we use myStatTypeStruct in all classes:
        this.statisticType    = statisticType;
        this.statisticSubType = statisticSubType;
        this.statisticApplyTo = statisticApplyTo;
        this.treeview_stats   = treeview_stats;

        this.markedRows = markedRows;

        this.evolution_mark_consecutives = evolution_mark_consecutives;

        this.graph    = graph;
        this.toReport = toReport;

        myStatTypeStruct = new StatTypeStruct(
            statisticApplyTo,
            sendSelectedSessions, sex_active,
            statsJumpsType, limit,
            markedRows, gRO,
            toReport, preferences);

        myStat = new Stat();         //create an instance of myStat

        fakeButtonRowCheckedUnchecked = new Gtk.Button();
        fakeButtonRowsSelected        = new Gtk.Button();
        fakeButtonNoRowsSelected      = new Gtk.Button();
    }
예제 #9
0
    //comes from report.cs
    public StatType(string statisticType, string statisticSubType, string statisticApplyTo,
                    ArrayList sendSelectedSessions, bool sex_active,
                    int statsJumpsType, int limit,
                    ArrayList markedRows, int evolution_mark_consecutives, GraphROptions gRO,
                    bool graph, bool toReport, Preferences preferences,
                    TextWriter writer, string fileName,
                    int statCount
                    )
    {
        this.statisticType    = statisticType;
        this.statisticSubType = statisticSubType;
        this.statisticApplyTo = statisticApplyTo;

        this.markedRows = markedRows;

        this.evolution_mark_consecutives = evolution_mark_consecutives;

        this.graph    = graph;
        this.toReport = toReport;

        this.writer    = writer;
        this.fileName  = fileName;
        this.statCount = statCount;

        myStatTypeStruct = new StatTypeStruct(
            statisticApplyTo,
            sendSelectedSessions, sex_active,
            statsJumpsType, limit,
            markedRows, gRO,
            toReport, preferences);

        myStat = new Stat();         //create and instance of myStat
    }
예제 #10
0
    public StatRjPotencyBosco(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 6;           //for simplesession (index, tv (avg), tc (avg), jumps, time, fall)

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper, index, tv(avg), tc(avg), jumps, time, fall
        }

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #11
0
    public StatSjCmjAbk(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 2;           //for simplesession

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper, height, TF
        }

        string [] columnsString = { Catalog.GetString("Jump"),
                                    Catalog.GetString("Height"), Catalog.GetString("TF") };

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #12
0
파일: global.cs 프로젝트: GNOME/chronojump
    public StatGlobal(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, int personID, string personName)
    {
        completeConstruction (myStatTypeStruct, treeview);

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for the statName, the AVG horizontal and SD horizontal
        } else {
            store = getStore(sessions.Count +1);
        }

        this.personID = personID;
        this.personName = personName;
        //this.heightPreferred = heightPreferred;

        string [] columnsString = { Catalog.GetString("Jump"), Catalog.GetString("Value") };

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }
    }
예제 #13
0
    public StatFv(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3;	//for simplesession (FV, cmj, sj)
        this.indexType = indexType; // "FV"

        jump1="SJl";
        jump2="SJ";

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper, FV, cmj, sj
        }

        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = indexType;
        columnsString[2] = jump1 + " (" + Catalog.GetString("height") + ")";
        columnsString[3] = jump2 + " (" + Catalog.GetString("height") + ")";

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #14
0
    public StatIeIub(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3;	//for simplesession (IE, cmj, sj)
        this.indexType = indexType; //"IE" or "IUB" or "FV"

        if(indexType == "IE") {
            jump1="CMJ";
            jump2="SJ";
        } else { //IUB
            jump1="ABK";
            jump2="CMJ";
        }

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper, IE, cmj, sj
        }

        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = indexType;
        columnsString[2] = jump1;
        columnsString[3] = jump2;

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #15
0
파일: global.cs 프로젝트: GNOME/chronojump
    public GraphGlobal(StatTypeStruct myStatTypeStruct, int personID, string personName)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 1; //for Simplesession
        this.personID = personID;
        this.personName = personName;
        //this.heightPreferred = heightPreferred;

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = "";
        }

        if(sessions.Count == 1) {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieTv = new GraphSerie();

            serieIndex.Title = translateYesNo("Value");
            if(heightPreferred) {
                serieTv.Title = translateYesNo("Height");
            } else {
                serieTv.Title = translateYesNo("TF");
            }

            serieIndex.IsLeftAxis = false;
            serieTv.IsLeftAxis = true;

            if(heightPreferred) {
                CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
            } else {
                CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
            }
            CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            if(heightPreferred) {
                CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
            } else {
                CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
            }
            //CurrentGraphData.LabelRight = "";
            CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
        }
    }
예제 #16
0
    public StatRjEvolution(StatTypeStruct myStatTypeStruct, int numContinuous, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.numContinuous = numContinuous;

        string sessionString = obtainSessionSqlString(sessions, "jumpRj");

        //we need to know the reactive with more jumps for prepare columns
        maxJumps = SqliteStat.ObtainMaxNumberOfJumps(sessionString);

        this.dataColumns = maxJumps * 2 + 2;            //for simplesession (index, fall, (tv , tc)*jumps)

        //only simplesession
        store = getStore(dataColumns + 1);        //jumper, datacolumns
        string [] columnsString;

        //in report, show only 5 TCs and 5 TFs every row,
        //if there are more jumps to show, let's cut them
        if (toReport && maxJumps > 5)
        {
            columnsString = new String[14];             //jumper, index, fall, count, 5 tc+tv
        }
        else
        {
            columnsString = new String[dataColumns + 1];
        }
        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = Catalog.GetString("Index");
        columnsString[2] = Catalog.GetString("Fall");

        if (toReport && maxJumps > 5)
        {
            columnsString[3] = Catalog.GetString("Count");
            for (int i = 0; i < maxJumps && i < 5; i++)
            {
                columnsString[(i + 1) * 2 + 2] = Catalog.GetString("TC");            //cols: 4, 6, 8, ...
                columnsString[(i + 1) * 2 + 3] = Catalog.GetString("TF");            //cols: 5, 7, 9, ...
            }
        }
        else
        {
            for (int i = 0; i < maxJumps; i++)
            {
                columnsString[(i + 1) * 2 + 1] = Catalog.GetString("TC") + (i + 1).ToString();          //cols: 3, 5, 7, ...
                columnsString[(i + 1) * 2 + 2] = Catalog.GetString("TF") + (i + 1).ToString();          //cols: 4, 6, 8, ...
            }
        }

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #17
0
    public GraphSjCmjAbkPlus(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3; //for Simplesession

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = "Simple jumps";
        }

        if(sessions.Count == 1) {
            //four series, the four columns
            serieTv = new GraphSerie();
            serieHeight = new GraphSerie();
            serieWeight = new GraphSerie();

            string weightName = Catalog.GetString("Weight");

            if(weightPercentPreferred)
                weightName += " %";
            else
                weightName += " Kg";
            serieTv.Title = Catalog.GetString("TF");
            serieHeight.Title = Catalog.GetString("Height");
            serieWeight.Title = weightName;

            serieTv.IsLeftAxis = true;
            serieHeight.IsLeftAxis = false;
            serieWeight.IsLeftAxis = false;

            CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)";
            CurrentGraphData.LabelRight =
                Catalog.GetString("Height") + "(cm), " +
                Catalog.GetString("Weight") + "(Kg)";
        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            if(heightPreferred) {
                CurrentGraphData.LabelLeft = Catalog.GetString("Height") + "(cm)";
            } else {
                CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)";
            }
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #18
0
파일: djQ.cs 프로젝트: GNOME/chronojump
    public GraphDjQ(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 5; //for Simplesession (index, height, tv, tc, fall)

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = Constants.QIndexFormula;
        }

        if(sessions.Count == 1) {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieHeight = new GraphSerie();
            serieTc = new GraphSerie();
            serieTv = new GraphSerie();
            serieFall = new GraphSerie();

            serieIndex.Title = translateYesNo("Q Index");
            serieHeight.Title = translateYesNo("Height");
            serieTc.Title = translateYesNo("TC");
            serieTv.Title = translateYesNo("TF");
            serieFall.Title = translateYesNo("Fall");

            serieIndex.IsLeftAxis = true;
            serieHeight.IsLeftAxis = false;
            serieTc.IsLeftAxis = true;
            serieTv.IsLeftAxis = true;
            serieFall.IsLeftAxis = false;

            CurrentGraphData.LabelLeft =
                translateYesNo("TC") + "(s), " +
                translateYesNo("TF") + "(s)";
            CurrentGraphData.LabelRight =
                translateYesNo("Index") + "(%), " +
                translateYesNo("Height") + "(cm), " +
                translateYesNo("Fall") + "(cm)";
        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #19
0
파일: potency.cs 프로젝트: GNOME/chronojump
    public GraphPotency(StatTypeStruct myStatTypeStruct, string indexType)
    {
        this.indexType = indexType;
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 4; //for Simplesession (index, personWeight, extraWeight, height)

        /*
        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }
        */
        this.operation = "";

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = translateYesNo("Peak Power");
        }

        if(sessions.Count == 1) {
            //four series, the four columns
            serieIndex = new GraphSerie();
            seriePersonWeight = new GraphSerie();
            serieExtraWeight = new GraphSerie();
            serieHeight = new GraphSerie();

            serieIndex.Title = translateYesNo("Peak Power");
            seriePersonWeight.Title = translateYesNo("Person's Weight");
            serieExtraWeight.Title = translateYesNo("Extra Weight") + " (Kg)";
            serieHeight.Title = translateYesNo("Height");

            serieIndex.IsLeftAxis = true;
            seriePersonWeight.IsLeftAxis = false;
            serieExtraWeight.IsLeftAxis = false;
            serieHeight.IsLeftAxis = false;

            CurrentGraphData.LabelLeft = translateYesNo("Peak Power") +
                "(" + translateYesNo("watts") + ")";
            CurrentGraphData.LabelRight =
                translateYesNo("Weight") + "(kg), " +
                translateYesNo("Height") + "(cm)";
        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft = translateYesNo("Peak Power") +
                "(" + translateYesNo("watts") + ")";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #20
0
    public GraphRunSimple(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;         //for Simplesession

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            CurrentGraphData.GraphTitle = "Simple races";
        }

        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieSpeed    = new GraphSerie();
            serieDistance = new GraphSerie();
            serieTime     = new GraphSerie();

            serieSpeed.Title    = translateYesNo("Speed");
            serieDistance.Title = translateYesNo("Distance");
            serieTime.Title     = translateYesNo("Time");;

            serieSpeed.IsLeftAxis    = true;
            serieDistance.IsLeftAxis = false;
            serieTime.IsLeftAxis     = false;

            CurrentGraphData.LabelLeft  = translateYesNo("Speed") + "(m/s)";
            CurrentGraphData.LabelRight =
                translateYesNo("Distance") + "(m), " +
                translateYesNo("Time") + "(s)";
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft  = translateYesNo("Speed") + "(s)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #21
0
    public StatRunIntervallic(StatTypeStruct myStatTypeStruct, int numContinuous, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.numContinuous = numContinuous;

        string sessionString = obtainSessionSqlString(sessions, "runInterval");

        //we need to know the run with more tracks for prepare columns
        maxRuns = SqliteStat.ObtainMaxNumberOfRuns(sessionString);

        this.dataColumns = maxRuns + 1;         //for simplesession (avg speed, speed of each track)

        //only simplesession
        store = getStore(dataColumns + 1);        //jumper, datacolumns
        string [] columnsString;

        //in report, show only 10 tracks every row,
        //if there are more tracks to show, let's cut them
        if (toReport && maxRuns > 10)
        {
            columnsString = new String[13];             //person, index, count, 10 tracks
        }
        else
        {
            columnsString = new String[dataColumns + 1];
        }
        columnsString[0] = Catalog.GetString("Person");
        columnsString[1] = Catalog.GetString("Speed");

        if (toReport && maxRuns > 10)
        {
            columnsString[2] = Catalog.GetString("Count");
            for (int i = 0; i < maxRuns && i < 10; i++)
            {
                columnsString[i + 3] = Catalog.GetString("Speed") + (i + 1).ToString();             //cols: 3, 4, 5, ...
            }
        }
        else
        {
            for (int i = 0; i < maxRuns; i++)
            {
                columnsString[i + 2] = Catalog.GetString("Speed") + (i + 1).ToString();             //cols: 2, 3, 4, ...
            }
        }

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #22
0
파일: fv.cs 프로젝트: GNOME/chronojump
    public GraphFv(StatTypeStruct myStatTypeStruct, string indexType)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3; //for Simplesession (index, jump1, jump2)
        //this.jumpType = jumpType;
        //this.limit = limit;

        jump1="SJl";
        jump2="SJ";

        //completeConstruction (treeview, sessions, newPrefsDigitsNumber, showSex, statsJumpsType);

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = Constants.FvIndexFormula;
        }

        if(sessions.Count == 1) {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieJump1 = new GraphSerie();
            serieJump2 = new GraphSerie();

            serieIndex.Title = indexType;
            serieJump1.Title = jump1 + " (" + translateYesNo("height") + ")";
            serieJump2.Title = jump2 + " (" + translateYesNo("height") + ")";

            serieIndex.IsLeftAxis = false;
            serieJump1.IsLeftAxis = true;
            serieJump2.IsLeftAxis = true;

            //this index is measured in height of CdG (not in tv)
            CurrentGraphData.LabelLeft =
                jump1 + " " + translateYesNo("Height") + "(cm), " +
                jump2 + " " + translateYesNo("Height") + "(cm)";
            CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #23
0
    public GraphJumpSimpleSubtraction(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 4; //for Simplesession (resultPercent, result, test1, test2)

        string [] applyTos = myStatTypeStruct.StatisticApplyTo.Split(new char[] {','});
        test1 = applyTos[0];
        test2 = applyTos[1];

        columnsString[0] = translateYesNo("Jumper");
        columnsString[1] = translateYesNo("ResultPercent");
        columnsString[2] = test1;
        columnsString[3] = test2;

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport)
            CurrentGraphData.GraphTitle = "";
        else
            CurrentGraphData.GraphTitle = string.Format(Catalog.GetString("Subtraction between {0} {1} and {0} {2}"), operation, test1, test2);

        if(sessions.Count == 1) {
            //four series, the four columns
            serieResultPercent = new GraphSerie();
            serieJump1 = new GraphSerie();
            serieJump2 = new GraphSerie();

            serieResultPercent.Title = translateYesNo("Result") + " %";
            serieJump1.Title = test1;
            serieJump2.Title = test2;

            serieResultPercent.IsLeftAxis = true;
            serieJump1.IsLeftAxis = false;
            serieJump2.IsLeftAxis = false;

            CurrentGraphData.LabelLeft = translateYesNo("Result") + " %";
            CurrentGraphData.LabelRight =
                test1 + " " + translateYesNo("TF") + "(s), " +
                test2 + " " + translateYesNo("TF") + "(s)";
        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft = translateYesNo("Result") + " %";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #24
0
    //numContinuous passed only for writing correct Enunciate
    public GraphRjEvolution(StatTypeStruct myStatTypeStruct, int numContinuous)
    {
        isRjEvolution = true;

        completeConstruction(myStatTypeStruct, treeview);
        this.numContinuous = numContinuous;

        string sessionString = obtainSessionSqlString(sessions, "jumpRj");

        //we need to know the reactive with more jumps for prepare columns
        //later this value can be changed in stats/main/plotgraphgraphseries because
        //there is possible to check the checked stats rows
        maxJumps = SqliteStat.ObtainMaxNumberOfJumps(sessionString);

        this.dataColumns = maxJumps * 2 + 2;            //for simplesession (index, (tv , tc)*jumps, fall)

        //in X axe, we print the number of jumps, not the jumper names
        //this should be equal to the number of jumps
        //xAxisNames = new ArrayList(0);
        for (int i = 0; i < maxJumps; i++)
        {
            //xAxisNames.Add((i+1).ToString());
            CurrentGraphData.XAxisNames.Add((i + 1).ToString());
        }

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = "";
        }


        CurrentGraphData.LabelLeft   = translateYesNo("Time") + "(s)";
        CurrentGraphData.LabelRight  = "";
        CurrentGraphData.LabelBottom = translateYesNo("Jumps");
    }
예제 #25
0
    public GraphRjAVGSD(StatTypeStruct myStatTypeStruct, string indexType)
    {
        this.indexType = indexType;

        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;         //for Simplesession (avg, sd, jumps)

        //no average for this stat
        //if (statsJumpsType == 2) {
        this.operation = "MAX";

        /*
         * } else {
         * this.operation = "AVG";
         * }
         */

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = indexType;
        }


        serieAVG   = new GraphSerie();
        serieSD    = new GraphSerie();
        serieJumps = new GraphSerie();

        serieAVG.Title   = translateYesNo("AVG");
        serieSD.Title    = translateYesNo("SD");
        serieJumps.Title = translateYesNo("Jumps");

        serieAVG.IsLeftAxis   = true;
        serieSD.IsLeftAxis    = true;
        serieJumps.IsLeftAxis = false;

        CurrentGraphData.LabelLeft =
            translateYesNo("AVG") + ", " +
            translateYesNo("SD");
        CurrentGraphData.LabelRight = translateYesNo("Jumps");

        CurrentGraphData.IsRightAxisInteger = true;
    }
예제 #26
0
    public StatRjEvolution(StatTypeStruct myStatTypeStruct, int numContinuous, Gtk.TreeView treeview)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.numContinuous = numContinuous;

        string sessionString = obtainSessionSqlString(sessions, "jumpRj");

        //we need to know the reactive with more jumps for prepare columns
        maxJumps = SqliteStat.ObtainMaxNumberOfJumps(sessionString);

        this.dataColumns = maxJumps*2 + 2;	//for simplesession (index, fall, (tv , tc)*jumps)

        //only simplesession
        store = getStore(dataColumns +1); //jumper, datacolumns
        string [] columnsString;

           //in report, show only 5 TCs and 5 TFs every row,
           //if there are more jumps to show, let's cut them
        if(toReport && maxJumps > 5 ) {
            columnsString = new String[14]; //jumper, index, fall, count, 5 tc+tv
        } else {
            columnsString =	new String[dataColumns +1];
        }
        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = Catalog.GetString("Index");
        columnsString[2] = Catalog.GetString("Fall");

        if(toReport && maxJumps > 5) {
            columnsString[3] = Catalog.GetString("Count");
            for(int i=0; i < maxJumps && i < 5; i++) {
                columnsString[(i+1)*2 +2] = Catalog.GetString("TC"); //cols: 4, 6, 8, ...
                columnsString[(i+1)*2 +3] = Catalog.GetString("TF"); //cols: 5, 7, 9, ...
            }
        } else {
            for(int i=0; i < maxJumps; i++) {
                columnsString[(i+1)*2 +1] = Catalog.GetString("TC") + (i+1).ToString(); //cols: 3, 5, 7, ...
                columnsString[(i+1)*2 +2] = Catalog.GetString("TF") + (i+1).ToString(); //cols: 4, 6, 8, ...
            }
        }

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #27
0
    public GraphRunSimple(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3; //for Simplesession

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            CurrentGraphData.GraphTitle = "Simple races";
        }

        if(sessions.Count == 1) {
            //four series, the four columns
            serieSpeed = new GraphSerie();
            serieDistance = new GraphSerie();
            serieTime = new GraphSerie();

            serieSpeed.Title = translateYesNo("Speed");
            serieDistance.Title = translateYesNo("Distance");
            serieTime.Title = translateYesNo("Time");;

            serieSpeed.IsLeftAxis = true;
            serieDistance.IsLeftAxis = false;
            serieTime.IsLeftAxis = false;

            CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(m/s)";
            CurrentGraphData.LabelRight =
                translateYesNo("Distance") + "(m), " +
                translateYesNo("Time") + "(s)";
        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(s)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #28
0
    public StatSjCmjAbkPlus(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;           //for simplesession (height, tv, weight)

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper, height, TF, weight (this col has characters '%' and 'Kg') solved in sqlite
        }

        weightPercentPreferred = myStatTypeStruct.preferences.weightStatsPercent;
        string weightName = Catalog.GetString("Extra weight");

        if (weightPercentPreferred)
        {
            weightName += " %";
        }
        else
        {
            weightName += " Kg";
        }

        string [] columnsString = { Catalog.GetString("Jumper"), Catalog.GetString("Height"),
                                    Catalog.GetString("TF"),     weightName };

        /*
         * if(! percent) {
         *      columnsString[3] = Catalog.GetString("Weight Kg");
         * }
         */

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #29
0
    public GraphRjAVGSD(StatTypeStruct myStatTypeStruct, string indexType)
    {
        this.indexType = indexType;

        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3; //for Simplesession (avg, sd, jumps)

        //no average for this stat
        //if (statsJumpsType == 2) {
        this.operation = "MAX";
        /*
           } else {
           this.operation = "AVG";
           }
           */

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = indexType;
        }

        serieAVG = new GraphSerie();
        serieSD = new GraphSerie();
        serieJumps = new GraphSerie();

        serieAVG.Title = Catalog.GetString("AVG");
        serieSD.Title = Catalog.GetString("SD");
        serieJumps.Title = Catalog.GetString("Jumps");

        serieAVG.IsLeftAxis = true;
        serieSD.IsLeftAxis = true;
        serieJumps.IsLeftAxis = false;

        CurrentGraphData.LabelLeft =
            Catalog.GetString("AVG") + ", " +
            Catalog.GetString("SD");
        CurrentGraphData.LabelRight = Catalog.GetString("Jumps");

        CurrentGraphData.IsRightAxisInteger = true;
    }
예제 #30
0
    public StatRunIntervallic(StatTypeStruct myStatTypeStruct, int numContinuous, Gtk.TreeView treeview)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.numContinuous = numContinuous;

        string sessionString = obtainSessionSqlString(sessions, "runInterval");

        //we need to know the run with more tracks for prepare columns
        maxRuns = SqliteStat.ObtainMaxNumberOfRuns(sessionString);

        this.dataColumns = maxRuns +1;	//for simplesession (avg speed, speed of each track)

        //only simplesession
        store = getStore(dataColumns +1); //jumper, datacolumns
        string [] columnsString;

           //in report, show only 10 tracks every row,
           //if there are more tracks to show, let's cut them
        if(toReport && maxRuns > 10 ) {
            columnsString = new String[13]; //person, index, count, 10 tracks
        } else {
            columnsString =	new String[dataColumns +1];
        }
        columnsString[0] = Catalog.GetString("Person");
        columnsString[1] = Catalog.GetString("Speed");

        if(toReport && maxRuns > 10) {
            columnsString[2] = Catalog.GetString("Count");
            for(int i=0; i < maxRuns && i < 10; i++) {
                columnsString[i+3] = Catalog.GetString("Speed") + (i+1).ToString(); //cols: 3, 4, 5, ...
            }
        } else {
            for(int i=0; i < maxRuns; i++) {
                columnsString[i+2] = Catalog.GetString("Speed") + (i+1).ToString(); //cols: 2, 3, 4, ...
            }
        }

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #31
0
    public StatJumpIndexes(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3;	//for simplesession (IE, cmj, sj)
        this.indexType = indexType; //"IE", Constants.ArmsUseIndexName, "IRna", "IRa"
        if(indexType == "IE") {
            jump1="CMJ";
            jump2="SJ";
        } else if(indexType == Constants.ArmsUseIndexName) {
            jump1="ABK";
            jump2="CMJ";
        } else if(indexType == "IRna") { //reactivity no arms
            jump1="DJna";
            jump2="CMJ";
        } else { //IRa //reactivity with arms
            jump1="DJa";
            jump2="CMJ";
        }

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper, IE, cmj, sj
        }

        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = indexType;

        columnsString[2] = jump1;
        if(useHeightsOnJumpIndexes)
            columnsString[2] = jump1 + " (" + Catalog.GetString("height") + ")";

        columnsString[3] = jump2;
        if(useHeightsOnJumpIndexes)
            columnsString[3] = jump2 + " (" + Catalog.GetString("height") + ")";

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #32
0
    public StatChronojumpProfile(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 5;	//for simplesession

        //if(sessions.Count > 1) {
        //	store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        //} else {
            store = getStore(dataColumns +1); //5 data columns + jumper name
        //}

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #33
0
파일: rjIndex.cs 프로젝트: GNOME/chronojump
    public StatRjIndex(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 4;	//for simplesession (index, tv (avg), tc (avg), fall)

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper, index, tv(avg), tc(avg), fall
        }

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #34
0
    //numContinuous passed only for writing correct Enunciate
    public GraphRjEvolution(StatTypeStruct myStatTypeStruct, int numContinuous)
    {
        isRjEvolution = true;

        completeConstruction (myStatTypeStruct, treeview);
        this.numContinuous = numContinuous;

        string sessionString = obtainSessionSqlString(sessions, "jumpRj");
        //we need to know the reactive with more jumps for prepare columns
        //later this value can be changed in stats/main/plotgraphgraphseries because
        //there is possible to check the checked stats rows
        maxJumps = SqliteStat.ObtainMaxNumberOfJumps(sessionString);

        this.dataColumns = maxJumps*2 + 2;	//for simplesession (index, (tv , tc)*jumps, fall)

        //in X axe, we print the number of jumps, not the jumper names
        //this should be equal to the number of jumps
        //xAxisNames = new ArrayList(0);
        for(int i=0; i<maxJumps ; i++) {
            //xAxisNames.Add((i+1).ToString());
            CurrentGraphData.XAxisNames.Add((i+1).ToString());
        }

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = "";
        }

        CurrentGraphData.LabelLeft = Catalog.GetString("Time") + "(s)";
        CurrentGraphData.LabelRight = "";
        CurrentGraphData.LabelBottom = Catalog.GetString("Jumps");
    }
예제 #35
0
    public StatPotency(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        this.indexType = indexType;

        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 4;           //for simplesession (potency, personweightinkg, extraweightink, height)

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper + dataColumns (weight cols have characters '%' and 'Kg') solved in sqlite
        }


        string [] columnsString = { Catalog.GetString("Jumper"),
                                    Catalog.GetString("Peak Power"),
                                    Catalog.GetString("Person's Weight"),
                                    Catalog.GetString("Extra Weight") + " (Kg)",
                                    Catalog.GetString("Height") };

        /*
         * if(! percent) {
         *      columnsString[3] = Catalog.GetString("Weight Kg");
         * }
         */

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #36
0
    public StatRunSimple(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3;	//for simplesession (speed, distance, time)

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper, speed, distance, time
        }

        string [] columnsString = { Catalog.GetString("Run"), Catalog.GetString("Speed"),
            Catalog.GetString("Distance"), Catalog.GetString("Time") };

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #37
0
    public StatSjCmjAbk(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 2;	//for simplesession

        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
            store = getStore(dataColumns +1); //jumper, height, TF
        }

        string [] columnsString = { Catalog.GetString("Jump"),
            Catalog.GetString("Height"), Catalog.GetString("TF") };

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #38
0
    public StatChronojumpProfile(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 5;           //for simplesession

        //if(sessions.Count > 1) {
        //	store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        //} else {
        store = getStore(dataColumns + 1);                //5 data columns + jumper name
        //}

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #39
0
    public StatGlobal(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, int personID, string personName)
    {
        completeConstruction(myStatTypeStruct, treeview);

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for the statName, the AVG horizontal and SD horizontal
        }
        else
        {
            store = getStore(sessions.Count + 1);
        }

        this.personID   = personID;
        this.personName = personName;
        //this.heightPreferred = heightPreferred;

        string [] columnsString = { Catalog.GetString("Jump"), Catalog.GetString("Value") };

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }
    }
예제 #40
0
파일: rjAVGSD.cs 프로젝트: GNOME/chronojump
    public StatRjAVGSD(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.indexType = indexType;

        this.dataColumns = 3;

        /*
         * only simplesession, because it has to plot two values: AVG, and SD
        if(sessions.Count > 1) {
            store = getStore(sessions.Count +3); //+3 (for jumper, the AVG horizontal and SD horizontal)
        } else {
        */
            store = getStore(dataColumns +1); //jumper, AVG, SD, jumps
        //}

        if(toReport) {
            reportString = prepareHeadersReport(columnsString);
        } else {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
    public StatJumpSimpleSubtraction(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 4;           //for simplesession (result %, result, test1, test2)


        string [] applyTos = myStatTypeStruct.StatisticApplyTo.Split(new char[] { ',' });
        test1 = applyTos[0];
        test2 = applyTos[1];

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper, result %, result, test1, test2
        }

        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = Catalog.GetString("Result") + " %";
        columnsString[2] = Catalog.GetString("Result");
        columnsString[3] = test1;
        columnsString[4] = test2;

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #42
0
    public GraphGlobal(StatTypeStruct myStatTypeStruct, int personID, string personName)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 1;         //for Simplesession
        this.personID    = personID;
        this.personName  = personName;
        //this.heightPreferred = heightPreferred;

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = "";
        }


        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieTv    = new GraphSerie();

            serieIndex.Title = translateYesNo("Value");
            if (heightPreferred)
            {
                serieTv.Title = translateYesNo("Height");
            }
            else
            {
                serieTv.Title = translateYesNo("TF");
            }

            serieIndex.IsLeftAxis = false;
            serieTv.IsLeftAxis    = true;

            if (heightPreferred)
            {
                CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
            }
            else
            {
                CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
            }
            CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            if (heightPreferred)
            {
                CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
            }
            else
            {
                CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
            }
            //CurrentGraphData.LabelRight = "";
            CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
        }
    }
예제 #43
0
    //comes from report.cs
    public StatType(string statisticType, string statisticSubType, string statisticApplyTo,
			ArrayList sendSelectedSessions, bool sex_active, 
			int statsJumpsType, int limit, 
			ArrayList markedRows, int evolution_mark_consecutives, GraphROptions gRO,
			bool graph, bool toReport, Preferences preferences, 
			TextWriter writer, string fileName,
			int statCount 
			)
    {
        this.statisticType = statisticType;
        this.statisticSubType = statisticSubType;
        this.statisticApplyTo = statisticApplyTo;

        this.markedRows = markedRows;

        this.evolution_mark_consecutives = evolution_mark_consecutives;

        this.graph = graph;
        this.toReport = toReport;

        this.writer = writer;
        this.fileName = fileName;
        this.statCount = statCount;

        myStatTypeStruct = new StatTypeStruct (
                statisticApplyTo,
                sendSelectedSessions, sex_active,
                statsJumpsType, limit,
                markedRows, gRO,
                toReport, preferences);

        myStat = new Stat(); //create and instance of myStat
    }
예제 #44
0
    //comes from gui/stats.cs
    public StatType(string statisticType, string statisticSubType, string statisticApplyTo, Gtk.TreeView treeview_stats,
			ArrayList sendSelectedSessions, bool sex_active, int statsJumpsType, int limit, 
			ArrayList markedRows, int evolution_mark_consecutives, GraphROptions gRO,
			bool graph, bool toReport, Preferences preferences)
    {
        //some of this will disappear when we use myStatTypeStruct in all classes:
        this.statisticType = statisticType;
        this.statisticSubType = statisticSubType;
        this.statisticApplyTo = statisticApplyTo;
        this.treeview_stats = treeview_stats ;

        this.markedRows = markedRows;

        this.evolution_mark_consecutives = evolution_mark_consecutives;

        this.graph = graph;
        this.toReport = toReport;

        myStatTypeStruct = new StatTypeStruct (
                statisticApplyTo,
                sendSelectedSessions, sex_active,
                statsJumpsType, limit,
                markedRows, gRO,
                toReport, preferences);

        myStat = new Stat(); //create an instance of myStat

        fakeButtonRowCheckedUnchecked = new Gtk.Button();
        fakeButtonRowsSelected = new Gtk.Button();
        fakeButtonNoRowsSelected = new Gtk.Button();
    }
예제 #45
0
    public GraphRjPotencyBosco(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 6; //for Simplesession (index, tv(avg), tc(avg), jumps, time, fall)

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = Constants.RJPotencyBoscoName;
            CurrentGraphData.GraphSubTitle = Constants.RJPotencyBoscoFormula;
        }

        if(sessions.Count == 1) {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieTc = new GraphSerie();
            serieTv = new GraphSerie();
            serieJumps = new GraphSerie();
            serieTime = new GraphSerie();
            serieFall = new GraphSerie();

            serieIndex.Title = Catalog.GetString("Index");
            serieTc.Title = Catalog.GetString("TC") + " (" + Catalog.GetString("AVG") + ")";
            serieTv.Title = Catalog.GetString("TF") + " (" + Catalog.GetString("AVG") + ")";
            //serieJumps.Title = Catalog.GetString("Jumps") + " *10";
            //serieTime.Title = Catalog.GetString("Time") + " *10";
            serieJumps.Title = Catalog.GetString("Jumps");
            serieTime.Title = Catalog.GetString("Time");
            serieFall.Title = Catalog.GetString("Fall");

            serieIndex.IsLeftAxis = false;
            serieTc.IsLeftAxis = true;
            serieTv.IsLeftAxis = true;
            serieJumps.IsLeftAxis = false;
            serieTime.IsLeftAxis = false;
            serieFall.IsLeftAxis = false;

            CurrentGraphData.LabelLeft =
                Catalog.GetString("TC") + "(s), " +
                Catalog.GetString("TF") + "(s)";
            CurrentGraphData.LabelRight =
                Catalog.GetString("Index") + "(%), " +
                Catalog.GetString("Jumps") + ", " +
                Catalog.GetString("Time") + "(s), " +
                Catalog.GetString("Fall") + "(cm)";
        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #46
0
    public StatJumpIndexes(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview, string indexType)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;           //for simplesession (IE, cmj, sj)
        this.indexType   = indexType;   //"IE", Constants.ArmsUseIndexName, "IRna", "IRa"
        if (indexType == "IE")
        {
            jump1 = "CMJ";
            jump2 = "SJ";
        }
        else if (indexType == Constants.ArmsUseIndexName)
        {
            jump1 = "ABK";
            jump2 = "CMJ";
        }
        else if (indexType == "IRna")            //reactivity no arms
        {
            jump1 = "DJna";
            jump2 = "CMJ";
        }
        else             //IRa //reactivity with arms
        {
            jump1 = "DJa";
            jump2 = "CMJ";
        }

        if (sessions.Count > 1)
        {
            store = getStore(sessions.Count + 3);            //+3 (for jumper, the AVG horizontal and SD horizontal)
        }
        else
        {
            store = getStore(dataColumns + 1);            //jumper, IE, cmj, sj
        }

        columnsString[0] = Catalog.GetString("Jumper");
        columnsString[1] = indexType;

        columnsString[2] = jump1;
        if (useHeightsOnJumpIndexes)
        {
            columnsString[2] = jump1 + " (" + Catalog.GetString("height") + ")";
        }

        columnsString[3] = jump2;
        if (useHeightsOnJumpIndexes)
        {
            columnsString[3] = jump2 + " (" + Catalog.GetString("height") + ")";
        }

        if (toReport)
        {
            reportString = prepareHeadersReport(columnsString);
        }
        else
        {
            treeview.Model = store;
            prepareHeaders(columnsString);
        }
    }
예제 #47
0
    public GraphJumpIndexes(StatTypeStruct myStatTypeStruct, string indexType)
    {
        completeConstruction (myStatTypeStruct, treeview);

        this.dataColumns = 3; //for Simplesession (index, jump1, jump2)

        this.indexType = indexType; //"IE" or Constants.ArmsUseIndexName or "IR"
        if(indexType == "IE") {
            jump1="CMJ";
            jump2="SJ";
        } else if(indexType == Constants.ArmsUseIndexName) {
            jump1="ABK";
            jump2="CMJ";
        } else if(indexType == "IRna") { //reactivity DJna
            jump1="DJna";
            jump2="CMJ";
        } else { //IRa //reactivity
            jump1="DJa";
            jump2="CMJ";
        }

        columnsString[0] = "Jumper";
        columnsString[1] = indexType;

        columnsString[2] = jump1;

        if(useHeightsOnJumpIndexes)
            columnsString[2] = jump1 + " (" + translateYesNo("height") + ")";

        columnsString[3] = jump2;
        if(useHeightsOnJumpIndexes)
            columnsString[3] = jump2 + " (" + translateYesNo("height") + ")";

        if (statsJumpsType == 2) {
            this.operation = "MAX";
        } else {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if(myStatTypeStruct.ToReport) {
            CurrentGraphData.GraphTitle = "";
        } else {
            //CurrentGraphData.GraphTitle = this.ToString();
            if(indexType == "IE")
                CurrentGraphData.GraphTitle = Constants.IeIndexFormula;
            else if(indexType == Constants.ArmsUseIndexName)
                CurrentGraphData.GraphTitle = Constants.ArmsUseIndexFormula;
            else if(indexType == "IRna")
                CurrentGraphData.GraphTitle = Constants.IRnaIndexFormula;
            else // indexType == "IRa"
                CurrentGraphData.GraphTitle = Constants.IRaIndexFormula;
        }

        if(sessions.Count == 1) {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieJump1 = new GraphSerie();
            serieJump2 = new GraphSerie();

            serieIndex.Title = indexType;
            serieJump1.Title = jump1;
            serieJump2.Title = jump2;

            serieIndex.IsLeftAxis = true;
            serieJump1.IsLeftAxis = false;
            serieJump2.IsLeftAxis = false;

            CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";

            CurrentGraphData.LabelRight =
                jump1 + " " + translateYesNo("TF") + "(s), " +
                jump2 + " " + translateYesNo("TF") + "(s)";
            if(useHeightsOnJumpIndexes)
                CurrentGraphData.LabelRight =
                    jump1 + " " + translateYesNo("height") + "(m), " +
                    jump2 + " " + translateYesNo("height") + "(m)";

        } else {
            for(int i=0; i < sessions.Count ; i++) {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #48
0
    public GraphPotency(StatTypeStruct myStatTypeStruct, string indexType)
    {
        this.indexType = indexType;
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 4;         //for Simplesession (index, personWeight, extraWeight, height)

        /*
         * if (statsJumpsType == 2) {
         *      this.operation = "MAX";
         * } else {
         *      this.operation = "AVG";
         * }
         */
        this.operation = "";

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = translateYesNo("Peak Power");
        }

        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieIndex        = new GraphSerie();
            seriePersonWeight = new GraphSerie();
            serieExtraWeight  = new GraphSerie();
            serieHeight       = new GraphSerie();

            serieIndex.Title        = translateYesNo("Peak Power");
            seriePersonWeight.Title = translateYesNo("Person's Weight");
            serieExtraWeight.Title  = translateYesNo("Extra Weight") + " (Kg)";
            serieHeight.Title       = translateYesNo("Height");

            serieIndex.IsLeftAxis        = true;
            seriePersonWeight.IsLeftAxis = false;
            serieExtraWeight.IsLeftAxis  = false;
            serieHeight.IsLeftAxis       = false;

            CurrentGraphData.LabelLeft = translateYesNo("Peak Power") +
                                         "(" + translateYesNo("watts") + ")";
            CurrentGraphData.LabelRight =
                translateYesNo("Weight") + "(kg), " +
                translateYesNo("Height") + "(cm)";
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft = translateYesNo("Peak Power") +
                                         "(" + translateYesNo("watts") + ")";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #49
0
    public GraphDjPower(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 6;         //for Simplesession (index, height, tv, tc, fall, weight)

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = Constants.DjPowerFormula;
        }

        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieIndex  = new GraphSerie();
            serieHeight = new GraphSerie();
            serieTc     = new GraphSerie();
            serieTv     = new GraphSerie();
            serieFall   = new GraphSerie();
            serieWeight = new GraphSerie();

            serieIndex.Title  = translateYesNo("Dj Index");
            serieHeight.Title = translateYesNo("Height");
            serieTc.Title     = translateYesNo("TC");
            serieTv.Title     = translateYesNo("TF");
            serieFall.Title   = translateYesNo("Fall");
            serieWeight.Title = translateYesNo("Weight");

            serieIndex.IsLeftAxis  = false;
            serieHeight.IsLeftAxis = false;
            serieTc.IsLeftAxis     = true;
            serieTv.IsLeftAxis     = true;
            serieFall.IsLeftAxis   = false;
            serieWeight.IsLeftAxis = false;

            CurrentGraphData.LabelLeft =
                translateYesNo("TC") + "(s), " +
                translateYesNo("TF") + "(s)";
            CurrentGraphData.LabelRight =
                translateYesNo("Index") + "(%), " +
                translateYesNo("Height") + "(cm), " +
                translateYesNo("Fall") + "(cm), " +
                translateYesNo("Weight") + "(Kg)";
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft  = translateYesNo("Power") + "(W)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #50
0
    public GraphJumpSimpleSubtraction(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 4;         //for Simplesession (resultPercent, result, test1, test2)

        string [] applyTos = myStatTypeStruct.StatisticApplyTo.Split(new char[] { ',' });
        test1 = applyTos[0];
        test2 = applyTos[1];

        columnsString[0] = translateYesNo("Jumper");
        columnsString[1] = translateYesNo("ResultPercent");
        columnsString[2] = test1;
        columnsString[3] = test2;

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            CurrentGraphData.GraphTitle = string.Format(Catalog.GetString("Subtraction between {0} {1} and {0} {2}"), operation, test1, test2);
        }


        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieResultPercent = new GraphSerie();
            serieJump1         = new GraphSerie();
            serieJump2         = new GraphSerie();

            serieResultPercent.Title = translateYesNo("Result") + " %";
            serieJump1.Title         = test1;
            serieJump2.Title         = test2;

            serieResultPercent.IsLeftAxis = true;
            serieJump1.IsLeftAxis         = false;
            serieJump2.IsLeftAxis         = false;

            CurrentGraphData.LabelLeft  = translateYesNo("Result") + " %";
            CurrentGraphData.LabelRight =
                test1 + " " + translateYesNo("TF") + "(s), " +
                test2 + " " + translateYesNo("TF") + "(s)";
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft  = translateYesNo("Result") + " %";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #51
0
    public GraphRjPotencyBosco(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 6;         //for Simplesession (index, tv(avg), tc(avg), jumps, time, fall)

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("Chronojump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle    = Constants.RJPotencyBoscoName;
            CurrentGraphData.GraphSubTitle = Constants.RJPotencyBoscoFormula;
        }


        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieTc    = new GraphSerie();
            serieTv    = new GraphSerie();
            serieJumps = new GraphSerie();
            serieTime  = new GraphSerie();
            serieFall  = new GraphSerie();

            serieIndex.Title = translateYesNo("Index");
            serieTc.Title    = translateYesNo("TC") + " (" + translateYesNo("AVG") + ")";
            serieTv.Title    = translateYesNo("TF") + " (" + translateYesNo("AVG") + ")";
            //serieJumps.Title = translateYesNo("Jumps") + " *10";
            //serieTime.Title = translateYesNo("Time") + " *10";
            serieJumps.Title = translateYesNo("Jumps");
            serieTime.Title  = translateYesNo("Time");
            serieFall.Title  = translateYesNo("Fall");

            serieIndex.IsLeftAxis = false;
            serieTc.IsLeftAxis    = true;
            serieTv.IsLeftAxis    = true;
            serieJumps.IsLeftAxis = false;
            serieTime.IsLeftAxis  = false;
            serieFall.IsLeftAxis  = false;

            CurrentGraphData.LabelLeft =
                translateYesNo("TC") + "(s), " +
                translateYesNo("TF") + "(s)";
            CurrentGraphData.LabelRight =
                translateYesNo("Index") + "(%), " +
                translateYesNo("Jumps") + ", " +
                translateYesNo("Time") + "(s), " +
                translateYesNo("Fall") + "(cm)";
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft  = translateYesNo("Index") + "(%)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #52
0
    public GraphSjCmjAbkPlus(StatTypeStruct myStatTypeStruct)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;         //for Simplesession

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("Chronojump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = "Simple jumps";
        }

        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieTv     = new GraphSerie();
            serieHeight = new GraphSerie();
            serieWeight = new GraphSerie();

            string weightName = translateYesNo("Extra weight");

            if (weightPercentPreferred)
            {
                weightName += " %";
            }
            else
            {
                weightName += " Kg";
            }
            serieTv.Title     = translateYesNo("TF");
            serieHeight.Title = translateYesNo("Height");
            serieWeight.Title = weightName;

            serieTv.IsLeftAxis     = true;
            serieHeight.IsLeftAxis = false;
            serieWeight.IsLeftAxis = false;

            CurrentGraphData.LabelLeft  = translateYesNo("TF") + "(s)";
            CurrentGraphData.LabelRight =
                translateYesNo("Height") + "(cm), " +
                translateYesNo("Weight") + "(Kg)";
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            if (heightPreferred)
            {
                CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
            }
            else
            {
                CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
            }
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #53
0
    public GraphJumpIndexes(StatTypeStruct myStatTypeStruct, string indexType)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;         //for Simplesession (index, jump1, jump2)

        this.indexType = indexType;   //"IE" or Constants.ArmsUseIndexName or "IR"
        if (indexType == "IE")
        {
            jump1 = "CMJ";
            jump2 = "SJ";
        }
        else if (indexType == Constants.ArmsUseIndexName)
        {
            jump1 = "ABK";
            jump2 = "CMJ";
        }
        else if (indexType == "IRna")            //reactivity DJna
        {
            jump1 = "DJna";
            jump2 = "CMJ";
        }
        else             //IRa //reactivity
        {
            jump1 = "DJa";
            jump2 = "CMJ";
        }

        columnsString[0] = "Jumper";
        columnsString[1] = indexType;

        columnsString[2] = jump1;


        if (useHeightsOnJumpIndexes)
        {
            columnsString[2] = jump1 + " (" + translateYesNo("height") + ")";
        }

        columnsString[3] = jump2;
        if (useHeightsOnJumpIndexes)
        {
            columnsString[3] = jump2 + " (" + translateYesNo("height") + ")";
        }

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("ChronoJump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            if (indexType == "IE")
            {
                CurrentGraphData.GraphTitle = Constants.IeIndexFormula;
            }
            else if (indexType == Constants.ArmsUseIndexName)
            {
                CurrentGraphData.GraphTitle = Constants.ArmsUseIndexFormula;
            }
            else if (indexType == "IRna")
            {
                CurrentGraphData.GraphTitle = Constants.IRnaIndexFormula;
            }
            else             // indexType == "IRa"
            {
                CurrentGraphData.GraphTitle = Constants.IRaIndexFormula;
            }
        }


        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieJump1 = new GraphSerie();
            serieJump2 = new GraphSerie();

            serieIndex.Title = indexType;
            serieJump1.Title = jump1;
            serieJump2.Title = jump2;

            serieIndex.IsLeftAxis = true;
            serieJump1.IsLeftAxis = false;
            serieJump2.IsLeftAxis = false;

            CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";

            CurrentGraphData.LabelRight =
                jump1 + " " + translateYesNo("TF") + "(s), " +
                jump2 + " " + translateYesNo("TF") + "(s)";
            if (useHeightsOnJumpIndexes)
            {
                CurrentGraphData.LabelRight =
                    jump1 + " " + translateYesNo("height") + "(m), " +
                    jump2 + " " + translateYesNo("height") + "(m)";
            }
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft  = translateYesNo("Index") + "(%)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #54
0
    public GraphFv(StatTypeStruct myStatTypeStruct, string indexType)
    {
        completeConstruction(myStatTypeStruct, treeview);

        this.dataColumns = 3;         //for Simplesession (index, jump1, jump2)
        //this.jumpType = jumpType;
        //this.limit = limit;

        jump1 = "SJl";
        jump2 = "SJ";

        //completeConstruction (treeview, sessions, newPrefsDigitsNumber, showSex, statsJumpsType);

        if (statsJumpsType == 2)
        {
            this.operation = "MAX";
        }
        else
        {
            this.operation = "AVG";
        }

        CurrentGraphData.WindowTitle = Catalog.GetString("Chronojump graph");
        //title is shown on the graph except it's a report, then title will be on the html
        if (myStatTypeStruct.ToReport)
        {
            CurrentGraphData.GraphTitle = "";
        }
        else
        {
            //CurrentGraphData.GraphTitle = this.ToString();
            CurrentGraphData.GraphTitle = Constants.FvIndexFormula;
        }

        if (sessions.Count == 1)
        {
            //four series, the four columns
            serieIndex = new GraphSerie();
            serieJump1 = new GraphSerie();
            serieJump2 = new GraphSerie();

            serieIndex.Title = indexType;
            serieJump1.Title = jump1 + " (" + translateYesNo("height") + ")";
            serieJump2.Title = jump2 + " (" + translateYesNo("height") + ")";

            serieIndex.IsLeftAxis = false;
            serieJump1.IsLeftAxis = true;
            serieJump2.IsLeftAxis = true;

            //this index is measured in height of CdG (not in tv)
            CurrentGraphData.LabelLeft =
                jump1 + " " + translateYesNo("Height") + "(cm), " +
                jump2 + " " + translateYesNo("Height") + "(cm)";
            CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
        }
        else
        {
            for (int i = 0; i < sessions.Count; i++)
            {
                string [] stringFullResults = sessions[i].ToString().Split(new char[] { ':' });
                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
            }
            CurrentGraphData.LabelLeft  = translateYesNo("Index") + "(%)";
            CurrentGraphData.LabelRight = "";
        }
    }
예제 #55
0
파일: main.cs 프로젝트: GNOME/chronojump
    protected void completeConstruction(StatTypeStruct myStatTypeStruct, Gtk.TreeView treeview)
    {
        //TODO: check, this is weird...
        this.sessions = myStatTypeStruct.SendSelectedSessions;
        pDN = myStatTypeStruct.preferences.digitsNumber;
        this.showSex = myStatTypeStruct.Sex_active;
        this.statsJumpsType = myStatTypeStruct.StatsJumpsType;
        this.heightPreferred = myStatTypeStruct.preferences.heightPreferred;
        this.weightStatsPercent = myStatTypeStruct.preferences.weightStatsPercent;
        this.statsJumpsType = myStatTypeStruct.StatsJumpsType;
        this.limit = myStatTypeStruct.Limit;
        this.jumpType = myStatTypeStruct.StatisticApplyTo;

        this.markedRows = myStatTypeStruct.MarkedRows;

        this.gRO = myStatTypeStruct.GRO;
        this.toReport = myStatTypeStruct.ToReport;
        this.graphTranslate = myStatTypeStruct.preferences.RGraphsTranslate;
        this.useHeightsOnJumpIndexes = myStatTypeStruct.preferences.useHeightsOnJumpIndexes;

        this.treeview = treeview;

        //initialize reportString
        reportString = "";

        iter = new TreeIter();

        personsWithData = new ArrayList();
    }