Esempio n. 1
0
    protected override void printData(string [] statValues)
    {
        //values are recorded for calculating later AVG and SD
        recordStatValues(statValues);

        //only simpleSession

        int i = 0;

        //we need to save this transposed
        foreach (string myValue in statValues)
        {
            if (i == 0)
            {
                CurrentGraphData.XAxisNames.Add(myValue);
            }
            else if (i == 1)
            {
                serieAVG.SerieData.Add(myValue);
            }
            else if (i == 2)
            {
                serieSD.SerieData.Add(myValue);
            }
            else if (i == 3)
            {
                serieJumps.SerieData.Add(myValue);
            }

            if (i == 3)
            {
                i = 0;
            }
            else
            {
                i++;
            }
        }

        //add created series to GraphSeries ArrayList
        //check don't do it two times
        if (GraphSeries.Count == 0)
        {
            GraphSeries.Add(serieAVG);
            GraphSeries.Add(serieSD);
            GraphSeries.Add(serieJumps);
        }
    }
Esempio n. 2
0
    protected override void printData(string [] statValues)
    {
        /*
         * if one day i found the way of plotting different (single plots) i will use it for the numContinuous
         */
        /*
         * if(numContinuous != -1) {
         *      int bestPos = findBestContinuous(statValues, numContinuous);
         *      if(bestPos != -1) {
         *              statValues = markBestContinuous(statValues, numContinuous, bestPos);
         *      }
         * }
         */

        GraphSerie serieTc = new GraphSerie();
        GraphSerie serieTv = new GraphSerie();

        serieTc.IsLeftAxis = true;
        serieTv.IsLeftAxis = true;

        int i = 0;

        foreach (string myValue in statValues)
        {
            if (i == 0)
            {
                serieTc.Title = myValue + " " + Catalog.GetString("TC");
                serieTv.Title = myValue + " " + Catalog.GetString("TF");
            }
            else if (isTC(i))
            {
                serieTc.SerieData.Add(myValue);
            }
            else if (isTF(i))
            {
                serieTv.SerieData.Add(myValue);
            }
            i++;
        }

        //add created series to GraphSeries ArrayList
        GraphSeries.Add(serieTc);
        GraphSeries.Add(serieTv);
    }
Esempio n. 3
0
    protected override void printData(string [] statValues)
    {
        /*
         * if one day i found the way of plotting different (single plots) i will use it for the numContinuous
         */
        /*
         * if(numContinuous != -1) {
         *      int bestPos = findBestContinuous(statValues, numContinuous);
         *      if(bestPos != -1) {
         *              statValues = markBestContinuous(statValues, numContinuous, bestPos);
         *      }
         * }
         */

        GraphSerie serieSpeed = new GraphSerie();

        serieSpeed.IsLeftAxis = true;

        int i = 0;

        foreach (string myValue in statValues)
        {
            if (i == 0)
            {
                serieSpeed.Title = myValue;
            }
            else if (i >= 2)
            {
                serieSpeed.SerieData.Add(myValue);
            }
            //i==1 is the avg speed, is not used

            i++;
        }

        //add created series to GraphSeries ArrayList
        GraphSeries.Add(serieSpeed);
    }
Esempio n. 4
0
    protected override void printData(string [] statValues)
    {
        if (sessions.Count == 1)
        {
            int i = 0;
            //we need to save this transposed
            string myValueBefore = "";
            foreach (string myValue in statValues)
            {
                if (i == 0)
                {
                    //don't plot AVG and SD rows
                    if (myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD"))
                    {
                        return;
                    }

                    //global is nicer and cleaner  without the AVG and SD
                    if (GraphSeries.Count == 0)
                    {
                        GraphSeries.Add(serieTv);
                        GraphSeries.Add(serieIndex);
                    }

                    /*
                     * //don't plot AVG and SD rows
                     * if( myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD") ) {
                     *      //good moment for adding created series to GraphSeries ArrayList
                     *      //check don't do it two times
                     *      if(GraphSeries.Count == 0) {
                     *              GraphSeries.Add(serieIndex);
                     *              GraphSeries.Add(serieTv);
                     *      }
                     *      return;
                     * }
                     */

                    if (myValue.StartsWith("IndexQ"))
                    {
                        CurrentGraphData.XAxisNames.Add(myValue.Replace("IndexQ", "IndexQ *10"));
                    }
                    else if (myValue == "FV")
                    {
                        CurrentGraphData.XAxisNames.Add(myValue.Replace("FV", "FV *10"));
                    }
                    else
                    {
                        CurrentGraphData.XAxisNames.Add(myValue);
                    }

                    //record the statistic (stripping of sex)
                    string [] stringFullResults = myValue.Split(new char[] { '.' });
                    myValueBefore = stringFullResults[0];
                }
                else
                {
                    if (myValueBefore.StartsWith("DjIndex") ||
                        myValueBefore.StartsWith("RjIndex") || myValueBefore.StartsWith(Constants.RJPotencyBoscoName) ||
                        myValueBefore == "IE" || myValueBefore == Constants.ArmsUseIndexName)
                    {
                        serieIndex.SerieData.Add(myValue);
                        //serieTv.SerieData.Add("-");
                    }
                    else if (myValueBefore.StartsWith("IndexQ") || myValueBefore == "FV")
                    {
                        serieIndex.SerieData.Add((
                                                     Convert.ToDouble(myValue) * 10).ToString());
                        //serieTv.SerieData.Add("-");
                    }
                    else
                    {
                        serieTv.SerieData.Add(myValue);
                        //serieIndex.SerieData.Add("-");
                    }
                }
                i++;
            }
        }
        else
        {
            GraphSerie mySerie = new GraphSerie();

            int    i             = 0;
            string myValueBefore = "";
            foreach (string myValue in statValues)
            {
                if (myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD"))
                {
                    return;
                }
                if (i == 0)
                {
                    //strip of sex
                    string [] stringFullResults = myValue.Split(new char[] { '.' });
                    string    valueNoSex        = stringFullResults[0];

                    if (valueNoSex.StartsWith("DjIndex") || valueNoSex.StartsWith("IndexQ") ||
                        valueNoSex.StartsWith("RjIndex") || valueNoSex.StartsWith(Constants.RJPotencyBoscoName) ||
                        valueNoSex == "IE" || valueNoSex == Constants.ArmsUseIndexName || valueNoSex == "FV")
                    {
                        mySerie.IsLeftAxis = false;
                    }
                    else
                    {
                        mySerie.IsLeftAxis = true;
                    }
                    myValueBefore = valueNoSex;                     //for changing later indexQ for indexQ*10
                    mySerie.Title = myValue;
                }
                else
                {
                    if (myValueBefore.StartsWith("IndexQ"))
                    {
                        if (myValue == "-")
                        {
                            mySerie.SerieData.Add(myValue);
                        }
                        else
                        {
                            mySerie.SerieData.Add((
                                                      Convert.ToDouble(myValue) * 10).ToString());
                        }
                        mySerie.Title = myValueBefore.Replace("IndexQ", "IndexQ *10");
                    }
                    else if (myValueBefore == "FV")
                    {
                        if (myValue == "-")
                        {
                            mySerie.SerieData.Add(myValue);
                        }
                        else
                        {
                            mySerie.SerieData.Add((
                                                      Convert.ToDouble(myValue) * 10).ToString());
                        }
                        mySerie.Title = myValueBefore.Replace("FV", "FV *10");
                    }
                    else
                    {
                        mySerie.SerieData.Add(myValue);
                    }
                }
                i++;
            }
            GraphSeries.Add(mySerie);
        }
    }
Esempio n. 5
0
    protected override void printData(string [] statValues)
    {
        //values are recorded for calculating later AVG and SD
        recordStatValues(statValues);

        if (sessions.Count == 1)
        {
            int  i        = 0;
            bool foundAVG = false;
            //we need to save this transposed
            foreach (string myValue in statValues)
            {
                if (i == 0)
                {
                    if (myValue == Catalog.GetString("AVG"))
                    {
                        foundAVG = true;
                    }
                    else
                    {
                        CurrentGraphData.XAxisNames.Add(myValue);
                    }
                }
                else if (i == 1)
                {
                    if (foundAVG)
                    {
                        serieResultPercent.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieResultPercent.SerieData.Add(myValue);
                    }
                    //2 is result and is not plotted
                }
                else if (i == 3)
                {
                    if (foundAVG)
                    {
                        serieJump1.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieJump1.SerieData.Add(myValue);
                    }
                }
                else if (i == 4)
                {
                    if (foundAVG)
                    {
                        serieJump2.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieJump2.SerieData.Add(myValue);
                    }
                }

                if (foundAVG && i == dataColumns)
                {
                    //add created series to GraphSeries ArrayList
                    //check don't do it two times
                    if (GraphSeries.Count == 0)
                    {
                        GraphSeries.Add(serieJump1);
                        GraphSeries.Add(serieJump2);
                        GraphSeries.Add(serieResultPercent);
                    }
                    return;
                }

                i++;
            }
        }
        else
        {
            GraphSerie mySerie = new GraphSerie();
            mySerie.IsLeftAxis = true;

            int i = 0;
            foreach (string myValue in statValues)
            {
                if (myValue == Catalog.GetString("SD"))
                {
                    return;
                }

                if (i == 0)
                {
                    mySerie.Title = myValue;
                }
                else if (i == sessions.Count + 1)                    //eg, for 2 sessions: [(0)person name, (1)sess1, (2)sess2, (3)AVG]
                {
                    if (myValue != "-")
                    {
                        mySerie.Avg = Convert.ToDouble(myValue);
                    }
                }
                else
                {
                    mySerie.SerieData.Add(myValue);
                }

                i++;
            }
            GraphSeries.Add(mySerie);
        }
    }
Esempio n. 6
0
    protected override void printData(string [] statValues)
    {
        //values are recorded for calculating later AVG and SD
        recordStatValues(statValues);

        if (sessions.Count == 1)
        {
            int  i        = 0;
            bool foundAVG = false;
            //we need to save this transposed
            foreach (string myValue in statValues)
            {
                if (i == 0)
                {
                    //don't plot AVG and SD rows
                    if (myValue == Catalog.GetString("AVG"))
                    {
                        foundAVG = true;
                    }
                    else
                    {
                        CurrentGraphData.XAxisNames.Add(myValue);
                    }
                }
                else if (i == 1)
                {
                    if (foundAVG)
                    {
                        serieIndex.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieIndex.SerieData.Add(myValue);
                    }
                }
                else if (i == 2)
                {
                    if (foundAVG)
                    {
                        serieJump1.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieJump1.SerieData.Add(myValue);
                    }
                }
                else if (i == 3)
                {
                    if (foundAVG)
                    {
                        serieJump2.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieJump2.SerieData.Add(myValue);
                    }
                }

                if (foundAVG && i == dataColumns)
                {
                    //add created series to GraphSeries ArrayList
                    //check don't do it two times
                    if (GraphSeries.Count == 0)
                    {
                        GraphSeries.Add(serieJump1);
                        GraphSeries.Add(serieJump2);
                        GraphSeries.Add(serieIndex);
                    }
                    return;
                }

                i++;
            }
        }
        else
        {
            GraphSerie mySerie = new GraphSerie();
            mySerie.IsLeftAxis = true;

            int i = 0;
            foreach (string myValue in statValues)
            {
                if (myValue == Catalog.GetString("AVG") || myValue == Catalog.GetString("SD"))
                {
                    return;
                }
                if (i == 0)
                {
                    mySerie.Title = myValue;
                }
                else
                {
                    mySerie.SerieData.Add(myValue);
                }
                i++;
            }
            GraphSeries.Add(mySerie);
        }
    }
Esempio n. 7
0
    protected override void printData(string [] statValues)
    {
        //values are recorded for calculating later AVG and SD
        recordStatValues(statValues);

        if (sessions.Count == 1)
        {
            int  i        = 0;
            bool foundAVG = false;
            //we need to save this transposed
            foreach (string myValue in statValues)
            {
                if (i == 0)
                {
                    //don't plot AVG and SD rows
                    if (myValue == Catalog.GetString("AVG"))
                    {
                        foundAVG = true;
                    }
                    else
                    {
                        CurrentGraphData.XAxisNames.Add(myValue);
                    }
                }
                else if (i == 1)
                {
                    if (foundAVG)
                    {
                        serieIndex.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieIndex.SerieData.Add(myValue);
                    }
                }
                else if (i == 2)
                {
                    if (foundAVG)
                    {
                        serieTv.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieTv.SerieData.Add(myValue);
                    }
                }
                else if (i == 3)
                {
                    if (foundAVG)
                    {
                        serieTc.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieTc.SerieData.Add(myValue);
                    }
                }
                else if (i == 4)
                {
                    //correct jumps and time for being displayed
                    if (foundAVG)
                    {
                        //serieJumps.Avg = Convert.ToDouble(myValue) *10;
                        serieJumps.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        //serieJumps.SerieData.Add( (Convert.ToDouble(myValue) *10).ToString() );
                        serieJumps.SerieData.Add(myValue);
                    }
                }
                else if (i == 5)
                {
                    //correct jumps and time for being displayed
                    if (foundAVG)
                    {
                        //serieTime.Avg = Convert.ToDouble(myValue) * 10;
                        serieTime.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        //serieTime.SerieData.Add( (Convert.ToDouble(myValue) *10).ToString() );
                        serieTime.SerieData.Add(myValue);
                    }
                }
                else if (i == 6)
                {
                    if (foundAVG)
                    {
                        serieFall.Avg = Convert.ToDouble(myValue);
                    }
                    else
                    {
                        serieFall.SerieData.Add(myValue);
                    }
                }

                if (foundAVG && i == dataColumns)
                {
                    //add created series to GraphSeries ArrayList
                    //check don't do it two times
                    if (GraphSeries.Count == 0)
                    {
                        GraphSeries.Add(serieTc);
                        GraphSeries.Add(serieTv);
                        GraphSeries.Add(serieIndex);
                        GraphSeries.Add(serieJumps);
                        GraphSeries.Add(serieTime);
                        GraphSeries.Add(serieFall);
                    }
                    return;
                }

                i++;
            }
        }
        else
        {
            GraphSerie mySerie = new GraphSerie();
            mySerie.IsLeftAxis = true;

            int i = 0;
            foreach (string myValue in statValues)
            {
                if (myValue == Catalog.GetString("SD"))
                {
                    return;
                }

                if (i == 0)
                {
                    mySerie.Title = myValue;
                }
                else if (i == sessions.Count + 1)                    //eg, for 2 sessions: [(0)person name, (1)sess1, (2)sess2, (3)AVG]
                {
                    if (myValue != "-")
                    {
                        mySerie.Avg = Convert.ToDouble(myValue);
                    }
                }
                else
                {
                    mySerie.SerieData.Add(myValue);
                }

                i++;
            }
            GraphSeries.Add(mySerie);
        }
    }