private void btnAddMotion_Click(object sender, EventArgs e)
        {
            double position, aceeleration, velocity, x_P, x_K, t_P, t_K;



            if (GetSelectedMotionType() == MotionType.UniformLinearMotion)
            {
                if (VerifyVelocityAndPositionValues(out velocity, out position))
                {
                    UniformLinearMotion motion = new UniformLinearMotion(Convert.ToDouble(tBoxX_0.Text), Convert.ToDouble(tBox_V_0.Text));

                    EquationListBox.Items.Add((EquationListBox.Items.Count + 1).ToString() + ". " + motion.ToString());

                    DrawMotion(motion);
                }
            }
            else if (GetSelectedMotionType() == MotionType.UniformAcceleratedLinearMotion)
            {
                if (VerifyAccelerationVelocityAndPositionValues(out aceeleration, out velocity, out position))
                {
                    UniformlyAcceleratedLinearMotion motion = new UniformlyAcceleratedLinearMotion(Convert.ToDouble(tBoxX_0.Text), Convert.ToDouble(tBox_V_0.Text), Convert.ToDouble(tBox_a.Text));
                    EquationListBox.Items.Add((EquationListBox.Items.Count + 1).ToString() + ". " + motion.ToString());
                    DrawMotion(motion);
                }
            }

            ListBoxRefresh();
        }
        private void DrawMotion(UniformLinearMotion motion)
        {
            string index = EquationListBox.Items.Count.ToString();

            chartMotions.Series.Add(index);
            chartMotions.Series[index].ChartType   = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
            chartMotions.Series[index].BorderWidth = 4;
            for (int i = 0; i < 100; i++)
            {
                chartMotions.Series[index].Points.AddXY(i, motion.GetPosition(i));
            }
        }