// this will analyze and compare the given data/path to the based path.
 public double analyzeData(int gestureNumber,Data nDataL, Data nDataR)
 {
     //this will determine if the gesture is the same (parallel) to the defined gesture
     double nearness = 0;
        // if (graph.Visible)
      //   graph.Close();
     switch (gestureNumber)
     {
         case 1:
             if(!nDataL.Exception())
                 curve = new ParallelCurve(leftButton.getCoords(), nDataL.getCoords(), leftButton.bEquation, leftButton.eqList, nDataL.getCoords2());
             if ((nearness = curve.getNearness()) < 0.15)
             {
                 InputSimulator.SimulateKeyPress(VirtualKeyCode.RIGHT);
                 graph.setDataPoint(leftButton.getCoords(),curve.getExpectedValues(),nDataL.getCoords());
                 graph.Location = new System.Drawing.Point(0, graph.Height);
                 graph.Show();
             }
             break;
         case 2:
             if (!nDataR.Exception())
                 curve = new ParallelCurve(rightButton.getCoords(), nDataR.getCoords(), rightButton.bEquation, rightButton.eqList, nDataR.getCoords2());
             if ((nearness = curve.getNearness()) < 0.15)
             {
                 InputSimulator.SimulateKeyPress(VirtualKeyCode.LEFT);
                 graph.setDataPoint(rightButton.getCoords(), curve.getExpectedValues(), nDataR.getCoords());
                 graph.Location = new System.Drawing.Point(0, graph.Height);
                 graph.Show();
             }
             break;
         case 3:
             if (!nDataL.Exception())
                 curve = new ParallelCurve(open.getCoords(),nDataL.getCoords(),open.bEquation,open.eqList,nDataL.getCoords2());
             if ((nearness = curve.getNearness()) < 0.15)
             {
                 InputSimulator.SimulateKeyPress(VirtualKeyCode.RETURN);
                 graph.setDataPoint(open.getCoords(), curve.getExpectedValues(), nDataL.getCoords());
                 graph.Location = new System.Drawing.Point(0, graph.Height);
                 graph.Show();
             }
             break;
         case 4:
             if (!nDataR.Exception())
                 curve = new ParallelCurve(close.getCoords(),nDataR.getCoords(),close.bEquation,close.eqList,nDataR.getCoords2());
             if ((nearness = curve.getNearness()) < 0.15)
             {
                 InputSimulator.SimulateModifiedKeyStroke(VirtualKeyCode.MENU, VirtualKeyCode.F4);
                 graph.setDataPoint(close.getCoords(), curve.getExpectedValues(), nDataR.getCoords());
                 graph.Location = new System.Drawing.Point(0, graph.Height);
                 graph.Show();
             }
             break;
         case 7:
             InputSimulator.SimulateKeyPress(VirtualKeyCode.TAB);
             break;
         case 8:
             InputSimulator.SimulateModifiedKeyStroke(VirtualKeyCode.SHIFT, VirtualKeyCode.TAB);
             break;
     }
     return nearness;
 }
        int hoverFile(Skeleton skelly, double diff,int totalFile)
        {
            double diff1 = 0;
            int row = 0, column = 0,coords = 0;
            diff1 = skelly.Joints[JointType.HandLeft].Position.Y - skelly.Joints[JointType.HipCenter].Position.Y;
            if (diff > -0.3 && diff <= -0.2)//1st column
            {
                column = 0;
            }
            else if (diff > -0.2 && diff <= -0.1)//2nd column
            {
                column = 1;
            }
            else if (diff > -0.1 && diff <= 0)//3rd column
            {
                column = 2;
            }
            else if (diff > 0 && diff <= 0.1)//4th column
            {
                column = 3;
            }
            else if (diff > 0.1 && diff <= 0.2)//5th column
            {
                column = 4;
            }
            else if (diff > 0.2 && diff <= 0.3)//6th column
            {
                column = 5;
            }
            else
            {
                column = -1;
            }

            //row
            if (diff1 > 0 && diff1 <= 0.1)//1st row
            {
                row = 6;
            }
            else if (diff1 > 0.1 && diff1 <= 0.2)//2nd row
            {
                row = 5;
            }
            else if (diff1 > 0.2 && diff1 <= 0.3)//3rd row
            {
                row = 4;
            }
            else if (diff1 > 0.3 && diff1 <= 0.4)//4th row
            {
                row = 3;
            }
            else if (diff1 > 0.4 && diff1 <= 0.5)//5th row
            {
                row = 2;
            }
            else if (diff1 > 0.5 && diff1 <= 0.6)//6th row
            {
                row = 1;
            }
            else if (diff1 > 0.6 && diff1 <= 0.7)//7th row
            {
                row = 0;
            }
            else
            {
                row = -1;
            }

            coords = (row * 6) + column;
            return coords;
        }