ObtainMaxNumberOfRuns() public static method

public static ObtainMaxNumberOfRuns ( string sessionString ) : int
sessionString string
return int
コード例 #1
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);
        }
    }
コード例 #2
0
    //numContinuous passed only for writing correct Enunciate
    public GraphRunIntervallic(StatTypeStruct myStatTypeStruct, int numContinuous)
    {
        isRunIntervalEvolution = true;

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

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

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

        this.dataColumns = maxRuns + 1;         //for simplesession (speedavg, speed*runs, )

        //in X axe, we print the number of runs, not the person names
        //this should be equal to the number of runs
        //xAxisNames = new ArrayList(0);
        for (int i = 0; i < maxRuns; 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("Speed") + "(m/s)";
        CurrentGraphData.LabelRight  = "";
        CurrentGraphData.LabelBottom = translateYesNo("Races");
    }