예제 #1
0
    protected override void write()
    {
        string tcString = "";

        if (hasFall)
        {
            //Log.WriteLine("TC: {0}", tc.ToString());
            tcString = " " + Catalog.GetString("TC") + ": " + Util.TrimDecimals(tc.ToString(), pDN);
        }
        else
        {
            tc = 0;
        }


        /*
         * string myStringPush =
         *      personName + " " +
         *      type + tcString + " " + Catalog.GetString("TF") + ": " + Util.TrimDecimals( tv.ToString(), pDN ) ;
         * if(weight > 0) {
         *      myStringPush = myStringPush + "(" + weight.ToString() + "%)";
         * }
         */
        if (simulated)
        {
            feedbackMessage = Catalog.GetString(Constants.SimulatedMessage);
        }
        else
        {
            feedbackMessage = "";
        }
        needShowFeedbackMessage = true;

        string table = Constants.JumpTable;

        uniqueID = SqliteJump.Insert(false, table, "NULL", personID, sessionID,
                                     type, tv, tc, fall, //type, tv, tc, fall
                                     weight, description, angle, Util.BoolToNegativeInt(simulated));

        //define the created object
        eventDone = new Jump(uniqueID, personID, sessionID, type, tv, tc, fall,
                             weight, description, angle, Util.BoolToNegativeInt(simulated));

        //event will be raised, and managed in chronojump.cs
        fakeButtonFinished.Click();

        PrepareEventGraphJumpSimpleObject = new PrepareEventGraphJumpSimple(tv, tc, sessionID, personID, table, type);
        needUpdateGraphType = eventType.JUMP;
        needUpdateGraph     = true;

        needEndEvent = true;         //used for hiding some buttons on eventWindow
    }
예제 #2
0
    protected override void write()
    {
        string tcString = "";
        if(hasFall) {
            //Log.WriteLine("TC: {0}", tc.ToString());
            tcString = " " + Catalog.GetString("TC") + ": " + Util.TrimDecimals( tc.ToString(), pDN ) ;
        } else {
            tc = 0;
        }

        /*
        string myStringPush =
            personName + " " +
            type + tcString + " " + Catalog.GetString("TF") + ": " + Util.TrimDecimals( tv.ToString(), pDN ) ;
        if(weight > 0) {
            myStringPush = myStringPush + "(" + weight.ToString() + "%)";
        }
        */
        if(simulated)
            feedbackMessage = Catalog.GetString(Constants.SimulatedMessage);
        else
            feedbackMessage = "";
        needShowFeedbackMessage = true;

        uniqueID = SqliteJump.Insert(false, Constants.JumpTable, "NULL", personID, sessionID,
                type, tv, tc, fall,  //type, tv, tc, fall
                weight, "", angle, Util.BoolToNegativeInt(simulated)); //weight, description, simulated

        //define the created object
        eventDone = new Jump(uniqueID, personID, sessionID, type, tv, tc, fall,
                weight, "", angle, Util.BoolToNegativeInt(simulated));

        //event will be raised, and managed in chronojump.cs
        fakeButtonFinished.Click();

        PrepareEventGraphJumpSimpleObject = new PrepareEventGraphJumpSimple(tv, tc);
        needUpdateGraphType = eventType.JUMP;
        needUpdateGraph = true;

        needEndEvent = true; //used for hiding some buttons on eventWindow
    }
예제 #3
0
파일: jump.cs 프로젝트: GNOME/chronojump
    private void updateGraphJumpsSimple()
    {
        if(currentPerson == null || currentSession == null)
            return;

        double tc = 0.0;
        if(! currentJumpType.StartIn)
            tc = 1; //just a mark meaning that tc has to be shown

        double tv = 1;
        //special cases where there's no tv
        if(currentEventType.Name == Constants.TakeOffName || currentEventType.Name == Constants.TakeOffWeightName)
            tv = 0.0;

        //intializeVariables if not done before
        event_execute_initializeVariables(
            ! cp2016.StoredCanCaptureContacts, //is simulated
            currentPerson.UniqueID,
            currentPerson.Name,
            Catalog.GetString("Phases"),  	  //name of the different moments
            Constants.JumpTable, //tableName
            currentJumpType.Name
            );

        PrepareEventGraphJumpSimple eventGraph = new PrepareEventGraphJumpSimple(
                tv, tc, currentSession.UniqueID, currentPerson.UniqueID, Constants.JumpTable, currentEventType.Name);

        if(eventGraph.personMAXAtSQLAllSessions > 0 || eventGraph.jumpsAtSQL.Length > 0)
            PrepareJumpSimpleGraph(eventGraph, false); //don't animate
    }