SelectRunIntervalTypesNew() public static method

public static SelectRunIntervalTypesNew ( string allRunsName, bool onlyName ) : List
allRunsName string
onlyName bool
return List
コード例 #1
0
    private void createTreeView_runs_interval_sprint(Gtk.TreeView tv)
    {
        LogB.Information("SPRINT create START");
        UtilGtk.RemoveColumns(tv);
        button_sprint.Sensitive            = false;
        image_sprint.Sensitive             = false;
        button_sprint_save_image.Sensitive = false;

        tv.HeadersVisible = true;

        int count = 0;

        tv.AppendColumn(Catalog.GetString("Type"), new CellRendererText(), "text", count++);
        tv.AppendColumn("ID", new CellRendererText(), "text", count++);
        tv.AppendColumn(Catalog.GetString("Distances"), new CellRendererText(), "text", count++);
        tv.AppendColumn(Catalog.GetString("Split times"), new CellRendererText(), "text", count++);
        tv.AppendColumn(Catalog.GetString("Total time"), new CellRendererText(), "text", count++);

        storeSprint = new TreeStore(
            typeof(string), typeof(string), typeof(string),
            typeof(string), typeof(string));
        tv.Model = storeSprint;

        if (currentSession == null || currentPerson == null)
        {
            return;
        }

        tv.Selection.Changed -= onTreeviewSprintSelectionEntry;
        tv.Selection.Changed += onTreeviewSprintSelectionEntry;

        List <object> runITypes = SqliteRunIntervalType.SelectRunIntervalTypesNew("", false);

        string [] runsArray = SqliteRunInterval.SelectRuns(
            false, currentSession.UniqueID, currentPerson.UniqueID, "");

        foreach (string line in runsArray)
        {
            //[] lineSplit has run params
            string [] lineSplit = line.Split(new char[] { ':' });

            //get intervalTimes
            string intervalTimesString = lineSplit[8];

            string positions = getSprintPositions(
                Convert.ToDouble(lineSplit[7]),                         //distanceInterval. == -1 means variable distances
                intervalTimesString,
                runIntervalTypeDistances(lineSplit[4], runITypes)       //distancesString
                );
            if (positions == "")
            {
                continue;
            }

            string splitTimes = getSplitTimes(intervalTimesString);

            string [] lineParams =
            {
                lineSplit[4],
                lineSplit[1],
                positions,
                splitTimes,
                Util.TrimDecimals(lineSplit[6], preferences.digitsNumber)
            };
            storeSprint.AppendValues(lineParams);
        }
        LogB.Information("SPRINT create END");
    }
コード例 #2
0
ファイル: cjCombo.cs プロジェクト: ylatuya/chronojump-1
 protected override void select()
 {
     l_types = (List <object>)SqliteRunIntervalType.SelectRunIntervalTypesNew("", false);         //without allrunsname, not only name
 }