Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8204535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:55:45+00:00 2026-06-07T07:55:45+00:00

I am creating a program where you do rep of a stretch, so it

  • 0

I am creating a program where you do rep of a stretch, so it adds one to amount of reps. I want to have a interval between each rep (not the current problem). I have this nested within the AllFramesReadyEventArgs. The problem is, since the SDK uses the AllFramesReadyEvent through out the whole program, so it is an infinite loop. How can I do each rep without it repeating when I don’t want it to? Thanks in advance.

if (skeleton.TrackingState == SkeletonTrackingState.Tracked)
{
    int whereIsX = (int)Canvas.GetLeft(ellipse1);
    int whereToX = (int)Canvas.GetLeft(pspine);
    whatToMultiplyX = whereToX / whereIsX;

    int whereIsY = (int)Canvas.GetTop(ellipse1);
    int whereToY = (int)Canvas.GetTop(pspine);
    whatToMultiplyY = whereToY / whereIsY;

    Canvas.SetTop(ellipse1, Canvas.GetTop(ellipse1) * whatToMultiplyY);
    Canvas.SetLeft(ellipse1, Canvas.GetLeft(ellipse1) * whatToMultiplyX);

    for (int i = 0; i < Doctor_ShoulderX.Count; i++)
    {
        Canvas.SetTop(doctorHand, Doctor_HandY[i] * whatToMultiplyY);
        Canvas.SetTop(doctorElbow, Doctor_ElbowY[i] * whatToMultiplyY);
        Canvas.SetTop(doctor_Shoulder, Doctor_ShoulderY[i] * whatToMultiplyY);

        Canvas.SetLeft(doctorHand, Doctor_HandX[i] * whatToMultiplyX);
        Canvas.SetLeft(doctorElbow, Doctor_ElbowX[i] * whatToMultiplyX);
        Canvas.SetLeft(doctor_Shoulder, Doctor_ShoulderX[i] * whatToMultiplyX);                        

        handX = Canvas.GetLeft(handright);
        handY = Canvas.GetTop(handright);

        elbowX = Canvas.GetLeft(elbowright);
        elbowY = Canvas.GetTop(elbowright);

        shoulderX = Canvas.GetLeft(shoulderright);
        shoulderY = Canvas.GetTop(shoulderright);

        shoulder_x.Text = "Shoulder X: " + shoulderX.ToString();
        shoulder_y.Text = "Shoulder Y: " + shoulderY.ToString();

        elbow_x.Text = "Elbow X: " + elbowX.ToString();
        elbow_y.Text = "Elbow Y: " + elbowY.ToString();

        hand_x.Text = "Hand X: " + handX.ToString();
        hand_y.Text = "Hand Y: " + handY.ToString();

        Patient_HandX.Add(handX);
        Patient_HandY.Add(handY);

        Patient_ElbowX.Add(elbowX);
        Patient_ElbowY.Add(elbowY);

        Patient_ShoulderX.Add(shoulderX);
        Patient_ShoulderY.Add(shoulderY);
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:55:47+00:00Added an answer on June 7, 2026 at 7:55 am

    I’ll use answer cause more writing than comment can handle 🙂

    aleframesready action is invoked in every frame. so if here you have limit of 20 in loop

    for (int i = 0; i < Doctor_ShoulderX.Count; i++)
    

    it will be invoked from 0 to 20 every time. Imo you you should create a static boolean variable in the class. After the code go out from the loop set it to false (if on start it had true). Before you invoke the loop check if the variable is set to true. If yes invoke the loop, if no just continue

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a program in VB.NET to output multiple images. Some images will have
I'm creating a program to open .txt files in a given directory, I have
I'm creating a program that authenticates from a before it runs. I also want
I am currently creating a program that dynamically adds Image to a dockPanel every
I have created a simply Pizza program (for a summer project not education related)
Im creating a program that is supposed have the user enter a student name
I'm creating a program in VB.NET (Microsoft's Visual Basic 2010). I want to know
I'm creating a program in SWT. I have a first Shell that has on
im creating a program that will compile java files, at the moment i have
i'm creating a program and i want to exit the program if i get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.